root@localhost conf]# /usr/local/nginx/sbin/nginx
/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 并没有找到,进入/lib目录中手动链接下
[root@localhost lib]# ln -s libpcre.so.0.0.1 libpcre.so.1
然后在启动nginx ok 了
[root@localhost lib]# /usr/local/nginx/sbin/nginx
[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
分享到:
相关推荐
当尝试启动MongoDB数据库服务时,遇到"error while loading shared libraries: libstdc++.so.6: cannot open shared object file"的错误,这通常意味着系统缺少一个必要的动态链接库——libstdc++.so.6。这是一个C++...
在Linux系统中,有时在运行某些程序时可能会遇到“error while loading shared libraries: libssl.so.10: cannot open shared object file: No such file or directory”这样的错误提示,这意味着系统缺少名为libssl...
#### 一、启动错误:`sbin/nginx: error while loading shared libraries: libpcre.so.1: cannot open shared object file: No such file or directory` **问题描述**: 在尝试启动Nginx时,可能会遇到如下的错误...
nginx+redis+tomcat分布式负载均衡遇到问题解决文档;部署nginx、redis、tomcat时出现的一些常见问题解决方式 ex:Nginx启动错误:error while loading shared libraries: libpcre.so.1
sbin/nginx: error while loading shared libraries: libpcre.so.1: cannot open shared object file: No such file or directory 这种错误是由于环境中缺少 libpcre.so.1 文件所致。解决方法是创建一个软链接: ...
centos6 pcre库
error while loading shared libraries: libpcre.so.1: cannot open shared object file: No such file or directory 五、启动 Nginx 安装完成后,需要启动 Nginx 服务器: /usr/local/webserver/nginx/sbin/...
登陆服务器之后进到nginx使用./nginx -s reload重新读取配置文件,发现报nginx: [error] open() “/usr/local/nginx/logs/nginx.pid” failed (2: No such file or directory)错误,进到logs文件发现的确没有nginx....
error while loading shared libraries: libpcre.so.0: cannot open shared object file: No such file or directory ``` 这通常是因为系统找不到所需的库文件。解决方法是创建一个软链接指向正确的库文件位置: ``...
3. 如果启动时遇到 "error while loading shared libraries: libpcre.so.1" 错误,需要确保依赖库已正确链接。可以通过 `whereis libpcre.so.1` 查找库文件,然后创建软链接: ``` ln -s /usr/local/lib/libpcre.so....
- 当遇到共享库加载错误时,如`error while loading shared libraries: libpcre.so.1: cannot open shared object file: No such file or directory`,可通过创建软链接的方式解决。 - 为了保证服务的正常运行,建议...
- 如果出现“nginx: error while loading shared libraries: libpcre.so.1”的错误,需要检查 libpcre 的版本是否正确。 3. **启动** - `/nginx/sbin/nginx` 4. **测试** - 访问 `http://192.168.182.129:80` 来...
sbin/nginx: error while loading shared libraries: libluajit-5.1.so.2: cannot open shared object file: No such file or directory ``` 可以通过检查动态库链接(`ldd`)来查找问题,然后将库的路径添加到`...
如果遇到如error while loading shared libraries: libpcre.so.1: cannot open shared object ***这类错误,说明需要手动创建软连接来解决依赖问题。 最后,启动Nginx服务器,检查其状态是否正常。这通常通过使用...