解决nginx编译时不全的情况

14 篇文章 1 订阅

前几章写的Nginx +Keepalived集群搭建添加链接描述
没有明确nginx编译的内容,只是简单的编译了,没有带相应的参数,相关同学和我反馈,说在部署应用的时候回出现错误,那这里补下编译的参数内容

./configure --prefix=/data/nginx --sbin-path=/data/nginx/sbin/nginx --conf-path=/data/nginx/conf/nginx.conf --error-log-path=/data/nginx/log/error.log --http-log-path=/data/nginx/log/access.log --pid-path=/data/nginx/log/pid/nginx.pid --lock-path=/data/nginx/log/lock/subsys/nginx --with-http_ssl_module --with-http_realip_module --with-http_addition_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_gzip_static_module --with-http_stub_status_module --with-http_perl_module --with-ld-opt="-Wl,-E" --with-http_image_filter_module

注意,编译的时候可能会报错,不要怕,报的错多为缺少相应的依赖包,只需要执行安装依赖包就可以。另外,这里编译的路径是/data,请务必注意!!!!

例如:
问题1:./configure: error: perl module ExtUtils::Embed is required

原因:
缺少perl-ExtUtils-Embed

解决方法:

yum install -y perl-ExtUtils-Embed

问题2:./configure: error: the HTTP image filter module requires the GD library.
You can either do not enable the module or install the libraries.

原因:
缺少
gd-devel

解决方法:

yum install -y gd-devel
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值