nginx更新启动不了

1.更新了一下nginx,发现启动不了

[root@pc1 //]# systemctl status nginx
● nginx.service - nginx - high performance web server
   Loaded: loaded (/usr/lib/systemd/system/nginx.service; disabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Sun 2020-10-18 21:18:47 CST; 1 day 19h ago
     Docs: http://nginx.org/en/docs/

Oct 18 21:18:47 pc1 systemd[1]: Starting nginx - high performance web server...
Oct 18 21:18:47 pc1 nginx[28222]: nginx: [emerg] module "/usr/lib64/nginx/modules/ngx_http_image_filter_module.so" version 1016001 instead of 1012002 in /usr/share/nginx/modules/mod-http-image-filter.conf:1
Oct 18 21:18:47 pc1 nginx[28222]: nginx: configuration file /etc/nginx/nginx.conf test failed
Oct 18 21:18:47 pc1 systemd[1]: nginx.service: control process exited, code=exited status=1
Oct 18 21:18:47 pc1 systemd[1]: Failed to start nginx - high performance web server.
Oct 18 21:18:47 pc1 systemd[1]: Unit nginx.service entered failed state.
Oct 18 21:18:47 pc1 systemd[1]: nginx.service failed.
[root@pc1 //]# systemctl start nginx
Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details.
[root@pc1 //]# journalctl -xe|grep nginx
Oct 20 17:08:50 pc1 systemd[1]: Starting nginx - high performance web server...
-- Subject: Unit nginx.service has begun start-up
-- Unit nginx.service has begun starting up.
Oct 20 17:08:51 pc1 nginx[32537]: nginx: [emerg] module "/usr/lib64/nginx/modules/ngx_http_image_filter_module.so" version 1016001 instead of 1012002 in /usr/share/nginx/modules/mod-http-image-filter.conf:1
Oct 20 17:08:51 pc1 nginx[32537]: nginx: configuration file /etc/nginx/nginx.conf test failed
Oct 20 17:08:51 pc1 systemd[1]: nginx.service: control process exited, code=exited status=1
Oct 20 17:08:51 pc1 systemd[1]: Failed to start nginx - high performance web server.
-- Subject: Unit nginx.service has failed
-- Unit nginx.service has failed.
Oct 20 17:08:51 pc1 systemd[1]: Unit nginx.service entered failed state.
Oct 20 17:08:51 pc1 systemd[1]: nginx.service failed.

2.这个原因是因为以前nginx modules 和现在官方的modules 不匹配需要我们先将旧的modules 卸载安装新版官方的modules

命令:

yum remove nginx-mod*

yum install nginx-module-*

systemctl restart nginx

解决~~~

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值