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

时间: 2024-08-02 11:00:22

Nginx 启动出错 error while loading shared libraries: libpcre.so.1的相关文章

Nginx启动出错 error while loading shared libraries

[[email protected] ~]#  /usr.local/nginx/sbin/nginx -c conf/nginx.conf sbin/nginx: error while loading shared libraries: libpcre.so.1: cannot open shared object file: No such file or directory 从错误看出是缺少libpcre.so.1文件导致 [[email protected] nginx]# ldd $

Nginx启动错误:error while loading shared libraries: libpcre.so.0

今天测试的时候,启动一个其他机器预编译好的nginx到目标测试机器(OEL 7.4)启动的时候,报了下列错误: /usr/local/nginx/sbin/nginx: error while loading shared libraries: libpcre.so.0: cannot open shared object file: No such file or directory 经查,OEL 7.4版本下/lib64下没有libpcre.so.0这个共享库,故创建一个到libpcre.s

解决软件启动报error while loading shared libraries: libgd.so.2: cannot open shared object错误

解决软件启动报error while loading shared libraries: libgd.so.2: cannot open shared object错误 今天安装启动nginx的时候报这个错误:error while loading shared libraries: libgd.so.2: cannot open shared object,网上查了相关资料,解决了,在此记录下,也让后面遇到这个问题的朋友能快速解决. 先说解决办法,帮助着急解决问题的朋友,这个是因为缺失gd库,

Nginx: error while loading shared libraries: libpcre.so.1解决

Shell代码 [[email protected] 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 确认已经安装PCRE: Shell代码 [[email protected] lib]$ cd /

error while loading shared libraries: libpcre.so.1: cannot open shared object file

执行启动nginx:/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 查找:[[email protected] lib]# find /-type f -name *libpcre.so.* 执行:[[ema

error while loading shared libraries: libpcre.so.0的解决办法(转)

error while loading shared libraries: libpcre.so.0的解决办法 昨晚刚买了台linux云服务器,今天配置apache2时,因没有备份libpcre.so.0文件便执行命令“rpm -e pcre –nodeps”,导致丢失libpcre.so.0文件.结果可想而知,新版的pcre再也安装不上了,apache2也无法再编译了.只要一编译,就提示错误: error while loading shared libraries: libpcre.so.0

error while loading shared libraries: libpcre.so.0的解决办法

因没有备份libpcre.so.0文件便执行命令“rpm -e pcre –nodeps”,导致丢失libpcre.so.0文件.结果可想而知,新版的pcre再也安装不上了,apache2也无法再编译了.只要一编译,就提示错误: error while loading shared libraries: libpcre.so.0: cannot open shared object file: No such file or directory 经过半天的折腾,从别的服务器上拷贝来一份libpc

安装源码包inotify启动失败 error while loading shared libraries: libinotifytools.so.0: cannot open shared object fil

今天安装源码包inotify 一切安装妥当之后启动失败,报如下错误: 第一感觉是找不到这个库,此时有两种可能 1,操作系统上没有安装该库 2,操作系统找不到该库 首先在/usr路径下查找该包的名称,如下图 ps:为什么要在/usr下找呢,因为库文件一般都安装在该目录下. 结果只在源码包的安装路径下找到了该库,证明以源码包形式安装该软件的时候该库已经被安装在操作系统中了. 这就验证了上边的第2项,操作系统找不到该库的路径. 此时我们应该想怎么让操作系统找到该库 在这之前呢我们要先知道一点,程序里面

cygwin运行git submodule init出错error while loading shared libraries的解决

installing the Devel\gettext package should solve your problem. git-submodule requires that. Unfortunately this is not marked as dependency. 附apt-cyg工具:https://code.google.com/p/apt-cyg/