1、下载并解压
wget https://tls.mbed.org/download/mbedtls-2.16.3-gpl.tgz
tar -xf mbedtls-2.16.3-gpl.tgz
cd mbedtls-2.16.3
备用下载地址:https://down.24kplus.com/linux/mbedtls/mbedtls-2.16.3-gpl.tgz
2、编译安装
make
make DESTDIR=/usr install
ldconfig
如果出现 make[1]: python2: Command not found 错误,执行:
yum -y install python2
如果出现 /usr/bin/env: ‘perl’: No such file or directory 错误,执行:
yum -y install perl
解决 error: Cannot find OpenSSL’s
yum install openssl openssl-devel
ln -s /usr/lib64/libssl.so /usr/lib/
解决 error: Libtool library used but ‘LIBTOOL’ is undefined 错误
yum install libtool
解决 exec: g++: not found 错误
yum -y update gcc
yum -y install gcc+ gcc-c++
解决 configure: error: tss lib not found: libtspi.so 错误
yum install trousers-devel
解决 Can’t exec “autopoint”: No such file or directory 错误
yum install gettext gettext-devel gettext-common-devel
解决 configure: error: libcrypto not found. 错误
yum remove openssl-devel
yum -y install openssl-devel
解决 configure: error: Package requirements (libffi >= 3.0.0) were not met: No package ‘libffi’ found 错误
yum install libffi-devel
解决 fatal error: uuid.h: No such file or directory 错误
yum install e2fsprogs-devel uuid-devel libuuid-devel
解决 configure: error: openssl lib not found: libcrypto.so 错误
yum install openssl-devel
解决 tar (child): lbzip2: Cannot exec: No such file or directory 错误
yum -y install bzip2
解决 configure: error: C++ preprocessor “/lib/cpp” fails sanity check 错误
yum install gcc-c++
解决 configure: error: Please reinstall the BZip2 distribution 错误
yum install bzip2 bzip2-devel
解决 configure: error: cURL version 7.15.5 or later is required to compile php with cURL support 错误
yum install curl-devel
解决 configure: error: not found. Please provide a path to MagickWand-config or Wand-config program 错误
yum install ImageMagick-devel
解决 configure: error: no acceptable C compiler found in $PATH 错误
yum install gcc
解决 configure: error: Package requirements (icu-uc >= 50.1 icu-io icu-i18n) were not met: 错误
yum install libicu-devel
解决 configure: error: Package requirements (sqlite3 > 3.7.4) were not met: No package ‘sqlite3’ found 错误
yum install sqlite-devel
解决 configure: error: Package requirements (oniguruma) were not met: No package ‘oniguruma’ found 错误
yum install oniguruma oniguruma-devel
wget https://github.com/kkos/oniguruma/archive/v6.9.4.tar.gz -O oniguruma-6.9.4.tar.gz
tar -zxvf oniguruma-6.9.4.tar.gz
cd oniguruma-6.9.4/
./autogen.sh
./configure
make
sudo make install
解决 bash: make: 未找到命令…
需要安装gcc,执行一下就可以了:
yum -y install gcc automake autoconf libtool make
yum install gcc gcc-c++
解决 configure: error: Package requirements (libzip >= 0.11 libzip != 1.3.1 libzip != 1.7.0) were not met:
Package ‘libzip’, required by ‘virtual:world’, not found
Package ‘libzip’, required by ‘virtual:world’, not found
Package ‘libzip’, required by ‘virtual:world’, not found
第一步:
rpm -q libzip rpm -q libzip-devel 查看是否有安装过,如果有,卸载它。yum remove libzip-devel libzip
第二步:
下载
wget https://libzip.org/download/libzip-1.7.3.tar.gz
解压
tar -xvf libzip-1.7.3.tar.gz
安装cmake3
yum install -y cmake3
sudo ln -sf /usr/bin/cmake3 /usr/bin/cmake
安装libzip
cd libzip-1.7.3/
mkdir build && cd build
cmake ..
make && make install
源码地址
https://pkgs.org/search/?q=libzip
通过源码安装
yum install http://mirror.centos.org/centos/8/AppStream/x86_64/os/Packages/libzip-1.5.2-1.module_el8.2.0+314+53b99e08.x86_64.rpm
yum install http://mirror.centos.org/centos/8/AppStream/x86_64/os/Packages/libzip-devel-1.5.2-1.module_el8.2.0+314+53b99e08.x86_64.rpm
解决 No package ‘libxml-2.0’ found缺失libxml2.0 库,错误:
yum -y install libxml2
yum -y install libxml2-devel
解决 configure: error: Package requirements (libxslt >= 1.1.0) were not met:No package ‘libxslt’ found 错误
yum install libxslt-devel
解决 configure: error: Package requirements (libpng) were not met:No package ‘libpng’ found 错误
yum install libpng-devel
解决 configure: error: Cannot find ldap.h 错误
yum install openldap
yum install openldap-devel
解决 configure: error: Cannot find ldap libraries in /usr/lib 错误
cp -frp /usr/lib64/libldap* /usr/lib/
解决 configure: error: Package requirements (libcurl >= 7.15.5) were not met: 错误
yum install libcurl-devel
解决 configure: error: Package requirements (krb5-gssapi krb5) were not met:
yum -y install krb5-devel
解决 configure: error: Package requirements (libjpeg) were not met:
yum install -y libjpeg-devel
解决 configure: error: Package requirements (freetype2) were not met:
yum -y install freetype freetype-devel
解决 configure: error: Package requirements (libpcre2-8 >= 10.30) were not met:
wget https://ftp.pcre.org/pub/pcre/pcre2-10.35.tar.gz
tar xzvf pcre2-10.35.tar.gz
cd pcre2-10.35
./configure --prefix=/usr/local/pcre2 \
--enable-pcre2-16 \
--enable-pcre2-32 \
--enable-jit \
--enable-jit-sealloc
make && make install
export PKG_CONFIG_PATH=/usr/local/pcre2/lib/pkgconfig/