【Nginx】configure 报错checking for C compiler … not found

全屏阅读
  • 基本信息
  • 作者:
  • 作者已发布:924篇文章
  • 发布时间:2022年05月09日 11:30:01
  • 所属分类:Linux, Nginx
  • 阅读次数:915次阅读
  • 标签:

编译安装在执行./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了

顶一下
(0)
100%
订阅 回复
踩一下
(0)
100%
» 郑重声明:本文由mpxq168发布,所有内容仅代表个人观点。版权归恒富网mpxq168共有,欢迎转载, 但未经作者同意必须保留此段声明,并给出文章连接,否则保留追究法律责任的权利! 如果本文侵犯了您的权益,请留言。

目前有 0 条留言 其中:访客:0 条, 博主:0 条

给我留言

您必须 [ 登录 ] 才能发表留言!