Linux安装nginx问题

在Linux CentOS系统中安装nginx时遇到错误,提示需要zlib库。通过下载并安装zlib和PCRE库,以及执行./configure和make install步骤,解决了报错问题,最终成功启动nginx。
摘要由CSDN通过智能技术生成

Linux安装nginx问题

报错内容:

./configure: error: the HTTP gzip module requires the zlib library.
You can either disable the module by using --without-http_gzip_module
option, or install the zlib library into the system, or build the zlib library
statically from the source with nginx by using --with-zlib= option.

1.nginx安装包导入linux服务器
2. tar -zxvf nginx-1.17.9.tar.gz 解压nginx
3. cd nginx-1.17.9 执行 ./configure --prefix=/usr/local/nginx
出现下图报错
在这里插入图片描述
4.网上查询让安装PCRE,在这里下载解压;chmod -R 777 pcre-8.44 授权文件夹;
cd pcre-8.44
运行 ./configure 进行pcre初始化配置 ;
执行make操作,进行编译;
执行make install,进行安装。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值