报错:
./configure: error: the HTTP XSLT module requires the libxml2/libxslt
libraries. You can either do not enable the module or install the libraries.解决:
yum install libxml2-devel libxslt-devel
报错:
./configure: error: the HTTP image filter module requires the GD library.
You can either do not enable the module or install the libraries.解决:
yum install gd-devel
报错:
./configure: error: perl module ExtUtils::Embed is required
解决:
yum -y install perl-ExtUtils-Embed
报错:
./configure: error: the Google perftools module requires the Google perftools
library. You can either do not enable the module or install the library.解决:
yum -y install gperftools
make的时候报错:
出现 /usr/bin/ld: warning: libcrypto.so.1.1, needed by /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/libssl.so, may conflict with libcrypto.so.10
系统中同时存在libcrypto.so.1.1和libcrypto.so.10两个版本的库,这可能导致冲突
解决:./configure后面接上openssl安装路径,--with-openssl=/usr/local/openssl
./configure --prefix=/usr/share/nginx ...... --with-openssl=/usr/local/openssl
make的时候报错:
make[1]: *** [/usr/local/openssl/.openssl/include/openssl/ssl.h] 错误 127
解决:
vim /usr/local/nginx-1.24.0/auto/lib/openssl
注释掉这4行
#CORE_INCS="$CORE_INCS $OPENSSL/.openssl/include"
#CORE_DEPS="$CORE_DEPS $OPENSSL/.openssl/include/openssl/ssl.h"
#CORE_LIBS="$CORE_LIBS $OPENSSL/.openssl/lib/libssl.a"
#CORE_LIBS="$CORE_LIBS $OPENSSL/.openssl/lib/libcrypto.a"添加以下4行
CORE_INCS="$CORE_INCS $OPENSSL/include"
CORE_DEPS="$CORE_DEPS $OPENSSL/include/openssl/ssl.h"
CORE_LIBS="$CORE_LIBS $OPENSSL/lib/libssl.a"
CORE_LIBS="$CORE_LIBS $OPENSSL/lib/libcrypto.a"保存文件,执行 make clean 清除编译配置,再重新
./configure --prefix=/usr/share/nginx ...... --with-openssl=/usr/local/openssl
make && make install