编译安装在执行./configure步骤报错,是因为缺少环境变量
checking for C compiler … not found
./configure: error: C compiler cc is not found
解决办法,安装环境需要
yum install gcc gcc-c++ -y
看到这里稍等,如果没有安装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= option.
解决办法
安装openssl openssl-devel
yum install openssl openssl-devel -y
完成后显示如下内容
Configuration summary
+ using system PCRE library
+ OpenSSL library is not used
+ using system zlib library
nginx path prefix: "/home/nginx"
nginx binary file: "/home/nginx/sbin/nginx"
nginx modules path: "/home/nginx/modules"
nginx configuration prefix: "/home/nginx/conf"
nginx configuration file: "/home/nginx/conf/nginx.conf"
nginx pid file: "/home/nginx/logs/nginx.pid"
nginx error log file: "/home/nginx/logs/error.log"
nginx http access log file: "/home/nginx/logs/access.log"
nginx http client request body temporary files: "client_body_temp"
nginx http proxy temporary files: "proxy_temp"
nginx http fastcgi temporary files: "fastcgi_temp"
nginx http uwsgi temporary files: "uwsgi_temp"
nginx http scgi temporary files: "scgi_temp"
剩下就可以执行make 和make install了
原文链接: https://www.cnblogs.com/zclinux/p/14417504.html
欢迎关注
微信关注下方公众号,第一时间获取干货硬货;公众号内回复【pdf】免费获取数百本计算机经典书籍
原创文章受到原创版权保护。转载请注明出处:https://www.ccppcoding.com/archives/208287
非原创文章文中已经注明原地址,如有侵权,联系删除
关注公众号【高性能架构探索】,第一时间获取最新文章
转载文章受原作者版权保护。转载请注明原作者出处!