linux 64位安装nginx后启动出错报以下错误
1
2
3
|
[root @localhost nginx- 1.3 . 0 ]# /usr/local/nginx/sbin/nginx
error while loading shared libraries: libpcre.so. 1 :
cannot open shared object file: No such file or directory |
从错误看出是缺少lib文件导致,进一步查看下
1
2
3
4
5
6
7
8
9
10
|
[root @localhost nginx- 1.3 . 0 ]# ldd $(which /usr/local/nginx/sbin/nginx)
linux-vdso.so. 1 => ( 0x00007fff4d5ff000 )
libpthread.so. 0 => /lib64/libpthread.so. 0 ( 0x00007fea7e357000 )
libcrypt.so. 1 => /lib64/libcrypt.so. 1 ( 0x00007fea7e120000 )
libpcre.so. 1 => not found
libz.so. 1 => /lib64/libz.so. 1 ( 0x00007fea7df09000 )
libc.so. 6 => /lib64/libc.so. 6 ( 0x00007fea7db76000 )
/lib64/ld-linux-x86- 64 .so. 2 ( 0x00007fea7e57d000 )
libfreebl3.so => /lib64/libfreebl3.so ( 0x00007fea7d913000 )
libdl.so. 2 => /lib64/libdl.so. 2 ( 0x00007fea7d70f000 )
|
可以看出 libpcre.so.1 => not found 并没有找到,进入/lib64目录中手动链接下
1
2
|
[root @localhost /]# cd lib64/
[root @localhost lib64]# ln -s libpcre.so. 0.0 . 1 libpcre.so. 1
|
然后启动nginx就ok了
相关推荐
#### 一、启动错误:`sbin/nginx: error while loading shared libraries: libpcre.so.1: cannot open shared object file: No such file or directory` **问题描述**: 在尝试启动Nginx时,可能会遇到如下的错误...
centos6 pcre库
sbin/nginx: error while loading shared libraries: libpcre.so.1: cannot open shared object file: No such file or directory 这种错误是由于环境中缺少 libpcre.so.1 文件所致。解决方法是创建一个软链接: ...
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+redis+tomcat分布式负载均衡遇到问题解决文档;部署nginx、redis、tomcat时出现的一些常见问题解决方式 ex:Nginx启动错误:error while loading shared libraries: libpcre.so.1
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.0: cannot open shared object file: No such file or directory ``` 这通常是因为系统找不到所需的库文件。解决方法是创建一个软链接指向正确的库文件位置: ``...
- 当遇到共享库加载错误时,如`error while loading shared libraries: libpcre.so.1: cannot open shared object file: No such file or directory`,可通过创建软链接的方式解决。 - 为了保证服务的正常运行,建议...
登陆服务器之后进到nginx使用./nginx -s reload重新读取配置文件,发现报nginx: [error] open() “/usr/local/nginx/logs/nginx.pid” failed (2: No such file or directory)错误,进到logs文件发现的确没有nginx....
- 如果出现“nginx: error while loading shared libraries: libpcre.so.1”的错误,需要检查 libpcre 的版本是否正确。 3. **启动** - `/nginx/sbin/nginx` 4. **测试** - 访问 `http://192.168.182.129:80` 来...
如果遇到如error while loading shared libraries: libpcre.so.1: cannot open shared object ***这类错误,说明需要手动创建软连接来解决依赖问题。 最后,启动Nginx服务器,检查其状态是否正常。这通常通过使用...