废柴阿尤6个月前发布关注私信 报错信息: (base) root@server11:/etc/nginx/conf.d# nginx -s reload nginx: [emerg] dlopen() "/usr/share/nginx/modules/ngx_http_xslt_filter_module.so" failed (libstdc++.so.6: cannot open shared object file: No such file or directory) in /etc/nginx/modules-enabled/50-mod-http-xslt-filter.conf:1 共享库地址:lib32stdc++6 要注意的是lib32stdc++6 共享库在安装时还依赖其他软件包,如下图 依赖地址:gcc-12-base libc6-i386 lib32gcc-s1 所以我们要一并下在依赖包 (base) root@server11:~# wget http://archive.ubuntu.com/ubuntu/pool/main/g/gcc-12/lib32stdc++6_12.3.0-1ubuntu1~22.04_amd64.deb (base) root@server11:~# wget http://archive.ubuntu.com/ubuntu/pool/main/g/gcc-12/lib32gcc-s1_12.3.0-1ubuntu1~22.04_amd64.deb (base) root@server11:~# wget http://archive.ubuntu.com/ubuntu/pool/main/g/glibc/libc6-i386_2.35-0ubuntu3.7_amd64.deb (base) root@server11:~# wget http://archive.ubuntu.com/ubuntu/pool/main/g/gcc-12/gcc-12-base_12.3.0-1ubuntu1~22.04_amd64.deb 安装软件包 (base) root@server11:~# dpkg -i lib32stdc++6_12.3.0-1ubuntu1~22.04_amd64.deb libc6-i386_2.35-0ubuntu3.7_amd64.deb lib32gcc-s1_12.3.0-1ubuntu1~22.04_amd64.deb gcc-12-base_12.3.0-1ubuntu1~22.04_amd64.deb 安装完成后重新启动nginx发现报新的错误,报错如下: (base) root@server11:~# nginx -s reload nginx: [error] invalid PID number "" in "/run/nginx.pid" 这个问题就比较好解决喽,重新加载nginx.conf文件就可以喽 (base) root@server11:~# nginx -c /etc/nginx/nginx.conf (base) root@server11:~# nginx -s reload 当然以下方式也可以解决 直接将 nginx 主进程的 PID 写入 "/run/nginx.pid" 杀掉 nginx 的主进程,然后重启 nginx 建议还是重新加载nginx.conf配置文件最为稳妥,要是再生产环境中干掉nginx在重启,鬼会晓得nginx重启后会不会节外生枝。 © 版权声明文章版权归作者所有,未经允许请勿转载。THE ENDNginx 喜欢就支持一下吧点赞11赞赏 分享QQ空间微博QQ好友海报分享复制链接收藏