【Nginx】configure 報錯checking for C compiler … not found
阿新 • • 發佈:2021-02-20
編譯安裝在執行./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_moduleoption, 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 librarynginx 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了