nginx error while loading shared libraries:

 本文解决:nginx error while loading shared libraries: 
error while loading shared libraries:
cannot open shared object file: No such file or directory

验证猜想:使用 linux ldd 命令( ldd命令可以列出一个程序所需要得动态链接库(so))
ldd $(which /usr/local/nginx/sbin/nginx) => (0x00007fff4d5ff000) => /lib64/ (0x00007fea7e357000) => /lib64/ (0x00007fea7e120000) => not found => /lib64/ (0x00007fea7df09000) => /lib64/ (0x00007fea7db76000)
/lib64/ (0x00007fea7e57d000) => /lib64/ (0x00007fea7d913000) => /lib64/ (0x00007fea7d70f000)

发现 => not found (没有找到),find 搜索 位置。发现在 /lib64 目录下。
ln -s /usr/local/lib/ /lib64

nginx -s reload #重启nginx

NGINX重启失败,nginx: [alert] kill(15004, 1) failed (3: No such process)
nginx: [error] invalid PID number “” in “/usr/local/var/run/nginx/”
Address already in use: make_sock: could not bind to address [::]:80
Nginx [emerg]: bind() to failed (98: Address already in use)
解决nginx错误:413 Request Entity Too Large

0 个评论