Nginx 启动出错 error while loading shared libraries: libpcre.so.1

简介:

在 centos 6.5  64位上编译安装nginx1.63语法检查出错
[root @localhost conf]# /usr/local/nginx/sbin/nginx -t

/usr/local/nginx/sbin/nginx: error while loading shared libraries: libpcre.so.1: cannot open shared object file: No such file or directory

从错误看出是缺少lib文件导致,进一步查看下
[root @localhost conf]# ldd $(which /usr/local/nginx/sbin/nginx)
linux-gate.so.1 =>  (0x0071b000)
libpthread.so.0 => /lib/libpthread.so.0 (0×00498000)
libcrypt.so.1 => /lib/libcrypt.so.1 (0×00986000)
libpcre.so.1 => not found
libcrypto.so.6 => /lib/libcrypto.so.6 (0×00196000)
libz.so.1 => /lib/libz.so.1 (0×00610000)
libc.so.6 => /lib/libc.so.6 (0x002d7000)
/lib/ld-linux.so.2 (0x006a8000)

libdl.so.2 => /lib/libdl.so.2 (0x008c3000)

可以看出 libpcre.so.1 => not found 并没有找到,

进入/lib64目录中手动链接下      #32位在/lib下
[root @localhost lib64]# ln -s libpcre.so.0.0.1 libpcre.so.1

[root @localhost lib]# /usr/local/nginx/sbin/nginx -t

nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful

然后在启动nginx  ok 了

/usr/local/nginx/sbin/nginx -t[root @localhost lib]# ps -ef |grep nginx
root      9539     1  0 19:06 ?        00:00:00 nginx: master process /usr/local/nginx/sbin/nginx
www       9540  9539  0 19:06 ?        00:00:00 nginx: worker process



本文转自 boy461205160 51CTO博客,原文链接:http://blog.51cto.com/461205160/1735651

相关文章
|
7月前
|
应用服务中间件 nginx
Nginx nginx: [error] open() "/usr/local/var/run/nginx.pid"
Nginx nginx: [error] open() "/usr/local/var/run/nginx.pid"
90 0
|
应用服务中间件 网络安全 nginx
nginx启动成功,但外部不能访问的问题
nginx启动成功,但外部不能访问的问题
2839 0
nginx启动成功,但外部不能访问的问题
|
应用服务中间件 Linux 开发工具
CentOS7下启动Nginx出现Failed to start nginx.service:unit not found
CentOS7下启动Nginx出现Failed to start nginx.service:unit not found
2985 0
CentOS7下启动Nginx出现Failed to start nginx.service:unit not found
|
7月前
|
应用服务中间件 nginx
Mac Nginx nginx: [error] open() “/usr/local/var/run/nginx.pid“
Mac Nginx nginx: [error] open() “/usr/local/var/run/nginx.pid“
58 1
|
3月前
|
存储 应用服务中间件 nginx
【各种问题处理】nginx报错nginx: [error] open() “/run/nginx.pid” failed (2: No such file or directory)
【1月更文挑战第13天】【各种问题处理】nginx报错nginx: [error] open() “/run/nginx.pid” failed (2: No such file or directory)
|
5月前
|
JavaScript 前端开发 Ubuntu
nginx部署vue后显示500 Internal Server Error解决方案
nginx部署vue后显示500 Internal Server Error解决方案
132 0
|
5月前
|
JavaScript 前端开发 Ubuntu
nginx部署vue后显示500 Internal Server Error解决方案
nginx部署vue后显示500 Internal Server Error解决方案
154 0
|
6月前
|
应用服务中间件 nginx
【Nginx异常】[error] 4236#29900: OpenEvent(“Global\ngx_reload_27128“) failed (5: Access is denied)
【Nginx异常】[error] 4236#29900: OpenEvent(“Global\ngx_reload_27128“) failed (5: Access is denied)
132 0
|
7月前
|
应用服务中间件 nginx
通过nginx访问连接websocket 错误 failed: Error during WebSocket handshake: Unexpected response code: 400
通过nginx访问连接websocket 错误 failed: Error during WebSocket handshake: Unexpected response code: 400
197 0
|
应用服务中间件 nginx Windows
Windows PowerShell 中启动 Nginx 报错解决方案
Windows PowerShell 中启动 Nginx 报错解决方案
Windows PowerShell 中启动 Nginx 报错解决方案