centos安裝源碼包nginx報錯

在安装CentOS 7.6上的Nginx 1.12.0时,配置过程中遇到HTTP重写模块需要PCRE库的错误。通过运行`yum install pcre-devel openssl-devel`命令成功安装了必要的开发库,然后重新执行`./configure`,问题得到解决。现在Nginx配置已成功,并显示了各种路径和日志文件位置。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

系統版本:CentOS Linux release 7.6.1810 (Core)

[root@localhost nginx-1.12.0]# ./configure --prefix=/data/xx/

./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,openssl-devel即可

[root@localhost nginx-1.12.0]# yum install pcre-devel -y
[root@localhost nginx-1.12.0]# yum install openssl-devel -y
[root@localhost nginx-1.12.0]# ./configure --prefix=/data/xx/

  nginx path prefix: "/data/xx/"
  nginx binary file: "/data/xx//sbin/nginx"
  nginx modules path: "/data/xx//modules"
  nginx configuration prefix: "/data/xx//conf"
  nginx configuration file: "/data/xx//conf/nginx.conf"
  nginx pid file: "/data/xx//logs/nginx.pid"
  nginx error log file: "/data/xx//logs/error.log"
  nginx http access log file: "/data/xx//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"

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值