Linux[CentOS 9]GNUTLS_LIBRARY GNUTLS_INCLUDE_DIR


MariaDB 10.3 版本与 MariaDB 10.1 版本的安装方法没有太大区别。与早期版本的不同之处在于,GnuTLS 包(而不是 OpenSSL)已更改为默认值。因此,如果不安装该包,则不会安装,会出现 Could NOT find GnuTLS 的错误

【MariaDB】

    1)在编译安装MariaDB时,会出现这个错误

CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find GnuTLS (missing: GNUTLS_LIBRARY GNUTLS_INCLUDE_DIR)
  (Required is at least version "3.3.24")
Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake/Modules/FindGnuTLS.cmake:68 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  libmariadb/CMakeLists.txt:331 (FIND_PACKAGE)

    2)在网上搜了很多资料,有说要降级GnuTLS版本的,但大部分都只提到了这一个命令:

yum install gnutls-dev

    3)可我执行后报下面的错误,搞得人很摸不着头脑,一直以为源出了问题,

No match for argument: gnutls-dev
Error: Unable to find a match: gnutls-dev

    4)换了半天源也没有解决,最终是因为环境缺少依赖,最终找到下面这个命令,一次吧缺少的包都安装上就好了。


【安装依赖包】

yum -y install cmake make gcc gcc-c++ ncurses-devel libevent openssl openssl-devel gnutls-devel libxml2 libxml2-devel bison wget

【问题解决】

Repository baseos is listed more than once in the configuration
Repository baseos-source is listed more than once in the configuration
Repository appstream is listed more than once in the configuration
Repository appstream-source is listed more than once in the configuration
Repository rt is listed more than once in the configuration
Repository rt-source is listed more than once in the configuration
Repository resilientstorage is listed more than once in the configuration
Repository resilientstorage-source is listed more than once in the configuration
Last metadata expiration check: 0:22:50 ago on Wed 16 Nov 2022 11:40:37 PM CST.
Package cmake-3.20.2-7.el9.x86_64 is already installed.
Package make-1:4.3-7.el9.x86_64 is already installed.
Package gcc-11.3.1-2.1.el9.x86_64 is already installed.
Package gcc-c++-11.3.1-2.1.el9.x86_64 is already installed.
Package ncurses-devel-6.2-8.20210508.el9.x86_64 is already installed.
Package libevent-2.1.12-6.el9.x86_64 is already installed.
Package openssl-1:3.0.1-43.el9.x86_64 is already installed.
Package openssl-devel-1:3.0.1-43.el9.x86_64 is already installed.
Package libxml2-2.9.13-2.el9.x86_64 is already installed.
Package libxml2-devel-2.9.13-2.el9.x86_64 is already installed.
Package bison-3.7.4-5.el9.x86_64 is already installed.
Package wget-1.21.1-7.el9.x86_64 is already installed.
Dependencies resolved.
=====================================================================================================================================
 Package                            Architecture               Version                           Repository                     Size
=====================================================================================================================================
Installing:
 gnutls-devel                       x86_64                     3.7.6-12.el9                      appstream                     2.4 M
Installing dependencies:
 gnutls-c++                         x86_64                     3.7.6-12.el9                      appstream                      34 k
 gnutls-dane                        x86_64                     3.7.6-12.el9                      appstream                      24 k
 libidn2-devel                      x86_64                     2.3.0-7.el9                       appstream                      64 k
 libtasn1-devel                     x86_64                     4.16.0-7.el9                      appstream                     336 k
 libtasn1-tools                     x86_64                     4.16.0-7.el9                      appstream                      25 k
 nettle-devel                       x86_64                     3.8-3.el9                         appstream                     675 k
 p11-kit-devel                      x86_64                     0.24.1-2.el9                      appstream                      93 k

Transaction Summary
=====================================================================================================================================
Install  8 Packages

Total download size: 3.7 M
Installed size: 7.5 M
Downloading Packages:
(1/8): gnutls-c++-3.7.6-12.el9.x86_64.rpm                                                            236 kB/s |  34 kB     00:00    
(2/8): gnutls-dane-3.7.6-12.el9.x86_64.rpm                                                           141 kB/s |  24 kB     00:00    
(3/8): libidn2-devel-2.3.0-7.el9.x86_64.rpm                                                          372 kB/s |  64 kB     00:00    
(4/8): libtasn1-devel-4.16.0-7.el9.x86_64.rpm                                                        1.2 MB/s | 336 kB     00:00    
(5/8): libtasn1-tools-4.16.0-7.el9.x86_64.rpm                                                        148 kB/s |  25 kB     00:00    
(6/8): gnutls-devel-3.7.6-12.el9.x86_64.rpm                                                          4.8 MB/s | 2.4 MB     00:00    
(7/8): p11-kit-devel-0.24.1-2.el9.x86_64.rpm                                                         489 kB/s |  93 kB     00:00    
(8/8): nettle-devel-3.8-3.el9.x86_64.rpm                                                             2.1 MB/s | 675 kB     00:00    
-------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                4.8 MB/s | 3.7 MB     00:00     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                             1/1 
  Installing       : p11-kit-devel-0.24.1-2.el9.x86_64                                                                           1/8 
  Installing       : nettle-devel-3.8-3.el9.x86_64                                                                               2/8 
  Installing       : libtasn1-tools-4.16.0-7.el9.x86_64                                                                          3/8 
  Installing       : libtasn1-devel-4.16.0-7.el9.x86_64                                                                          4/8 
  Installing       : libidn2-devel-2.3.0-7.el9.x86_64                                                                            5/8 
  Installing       : gnutls-dane-3.7.6-12.el9.x86_64                                                                             6/8 
  Installing       : gnutls-c++-3.7.6-12.el9.x86_64                                                                              7/8 
  Installing       : gnutls-devel-3.7.6-12.el9.x86_64                                                                            8/8 
  Running scriptlet: gnutls-devel-3.7.6-12.el9.x86_64                                                                            8/8 
  Verifying        : gnutls-c++-3.7.6-12.el9.x86_64                                                                              1/8 
  Verifying        : gnutls-dane-3.7.6-12.el9.x86_64                                                                             2/8 
  Verifying        : gnutls-devel-3.7.6-12.el9.x86_64                                                                            3/8 
  Verifying        : libidn2-devel-2.3.0-7.el9.x86_64                                                                            4/8 
  Verifying        : libtasn1-devel-4.16.0-7.el9.x86_64                                                                          5/8 
  Verifying        : libtasn1-tools-4.16.0-7.el9.x86_64                                                                          6/8 
  Verifying        : nettle-devel-3.8-3.el9.x86_64                                                                               7/8 
  Verifying        : p11-kit-devel-0.24.1-2.el9.x86_64                                                                           8/8 

Installed:
  gnutls-c++-3.7.6-12.el9.x86_64            gnutls-dane-3.7.6-12.el9.x86_64             gnutls-devel-3.7.6-12.el9.x86_64           
  libidn2-devel-2.3.0-7.el9.x86_64          libtasn1-devel-4.16.0-7.el9.x86_64          libtasn1-tools-4.16.0-7.el9.x86_64         
  nettle-devel-3.8-3.el9.x86_64             p11-kit-devel-0.24.1-2.el9.x86_64          

Complete!


上一篇 下一篇

评论

登录后可发表评论