CentOS源码编译nginx时
报错内容:
checking for OS
+ Linux 2.6.32-358.el6.x86_64 x86_64
checking for C compiler ... not found
解决方法:
yum install gcc gcc-c++ kernel-devel
报错内容:
./configure: error: SSL modules require the OpenSSL library.
You can either do not enable the modules, or install the OpenSSL library
into the system, or build the OpenSSL library statically from the source
with nginx by using --with-openssl=<path> option.
环境中缺少openssl和openssl-devel组件
解决方法:
yum -y install openssl openssl-devel
报错内容:
./configure: error: the HTTP rewrite module requires the PCRE library.
You can either disable the module by using --without-http_rewrite_module
option, or install the PCRE library into the system, or build the PCRE library
statically from the source with nginx by using --with-pcre=<path> option.
缺少pcre-devel组件
解决方法:
yum -y install pcre-devel
本文针对在CentOS环境下使用源码编译nginx过程中遇到的几个典型错误进行了详细的解析,并提供了相应的解决办法,包括安装必要的编译工具、openssl、openssl-devel、pcre-devel等组件。
2434

被折叠的 条评论
为什么被折叠?



