linux 系统没有自带 zip 的压缩解压工具。当用到 zip 或者 unzip 如果没有安装就会出现 -bash: unzip: Command Not Found-bash: zip: Command Not Found,需要我们自己安装。

CentOS 安装

yum install -y unzip zip

Ubuntu 安装

sudo apt-get install zip

CentOS 7 源码安装 p11-kit,解决 configure: error: p11-kit >= 0.23.1 was not found. To disable PKCS #11 support 错误。

1、下载并解压

wget https://github.com/p11-glue/p11-kit/releases/download/0.23.16/p11-kit-0.23.16.tar.gz
tar -zxvf p11-kit-0.23.16.tar.gz
cd p11-kit-0.23.16

备用下载地址: https://down.24kplus.com/linux/p11-kit-0.23.16.tar.gz

2、编译安装

./configure \
--prefix=/usr \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--libexecdir=/usr/libexec \
--sysconfdir=/etc/p11-kit \
--libdir=/usr/lib64 \
--includedir=/usr/include \
--datarootdir=/usr/share \
--infodir=/usr/share/info \
--localedir=/usr/local \
--mandir=/usr/share/man \
--docdir=/usr/share/doc/p11-kit
make
make install

如果出现 configure: error: libtasn1 not found. Building without it results in significant loss of functionality. To proceed use --without-libtasn1 错误,执行:

yum install -y libtasn1-devel

如果出现 configure: error: Package requirements (libffi >= 3.0.0) were not met: No package 'libffi' found 错误,执行:

yum install -y libffi-devel

CentOS 7 源码安装 libidn2 最新版,解决 error while loading shared libraries: libidn2.so.4: cannot open shared object file: No such file or directory 错误

1、下载并解压

wget https://ftp.gnu.org/gnu/libidn/libidn2-latest.tar.gz
tar -zxvf libidn2-latest.tar.gz
cd libidn2*

2、编译安装

./configure \
--prefix=/usr \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--libexecdir=/usr/libexec \
--sysconfdir=/etc/libidn2 \
--libdir=/usr/lib64 \
--includedir=/usr/include \
--datarootdir=/usr/share \
--infodir=/usr/share/info \
--localedir=/usr/local \
--mandir=/usr/share/man \
--docdir=/usr/share/doc/libidn2 \
--with-packager \
--with-packager-version \
--with-packager-bug-reports
make
make install

CentOS 7 源码安装 openpts 0.2.6。

1、下载并解压

wget https://mirrors.xtom.com/osdn/openpts/54410/openpts-0.2.6.tar.gz
tar -zxvf openpts-0.2.6.tar.gz
cd openpts-0.2.6

备用下载地址:https://down.24kplus.com/linux/openpts-0.2.6.tar.gz

2、编译安装

./bootstrap.sh
./configure \
--prefix=/usr \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--libexecdir=/usr/libexec \
--sysconfdir=/etc/openpts \
--libdir=/usr/lib64 \
--includedir=/usr/include \
--datarootdir=/usr/share \
--infodir=/usr/share/info \
--localedir=/usr/local \
--mandir=/usr/share/man \
--docdir=/usr/share/doc/openpts \
--with-tss \
--with-aru \
--enable-tnc
make
make install

如果出现 /include/openpts.h:50:17: fatal error: tss.h: No such file or directory 错误,安装:

yum install trousers-devel

如果出现 fatal error: uuid.h: No such file or directory 错误,安装:

yum install e2fsprogs-devel uuid-devel libuuid-devel

CentOS 7 源码安装 tpm-tools 1.3.9.1

1、下载并解压

mkdir tpm-tools
cd tpm-tools
wget https://nchc.dl.sourceforge.net/project/trousers/tpm-tools/1.3.9.1/tpm-tools-1.3.9.1.tar.gz
tar -zxvf tpm-tools-1.3.9.1.tar.gz

备用下载地址:https://down.24kplus.com/linux/tpm-tools-1.3.9.1.tar.gz

2、编译安装

./configure \
--prefix=/usr \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--libexecdir=/usr/libexec \
--sysconfdir=/etc/tpm-tools \
--libdir=/usr/lib64 \
--includedir=/usr/include \
--datarootdir=/usr/share \
--infodir=/usr/share/info \
--localedir=/usr/local \
--mandir=/usr/share/man \
--docdir=/usr/share/doc/tpm-tools
make
make install

如果出现 configure: error: tss lib not found: libtspi.so 错误:

yum install trousers-devel

如果出现 configure: error: openssl lib not found: libcrypto.so 错误:

yum install openssl-devel

解决 WordPress 5.x 站点健康( Site Health )检查提示 The optional module, imagick, is not installed, or has been disabled. 问题。

输入以下命令安装 imagick:

pecl install imagick

此时会提示 Please provide the prefix of ImageMagick installation [autodetect]

输入:

/usr

如果 php 是自行源码编译安装的请输入 php 安装目录,如:/usr/local

如果出现 configure: error: not found. Please provide a path to MagickWand-config or Wand-config program 错误,执行:

yum install ImageMagick-devel

在php.ini文件中加入一行:

extension=imagick.so

重启 php-fpm 服务

systemctl restart php-fpm

CentOS 7 源码安装 libmaxminddb 1.3.2 最新版。 libmaxminddb 是 ngx_http_geoip2_module 依赖项之一。

1、下载源码,并解压

wget https://github.com/maxmind/libmaxminddb/releases/download/1.3.2/libmaxminddb-1.3.2.tar.gz
tar -xvf libmaxminddb-1.3.2.tar.gz
cd libmaxminddb-1.3.2

备用下载地址:https://down.24kplus.com/linux/libmaxminddb-1.3.2.tar.gz

2、编译安装

./configure --prefix=/usr
make
sudo make install
sudo ldconfig