灌溉梦想,记录脚步
« »
2012年2月6日技术合集

Nginx启动出错

在Centos 64位上编译安装nginx后,启动时报错:

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

从错误看出是缺少lib文件导致,进一步查看下

[root@vps1 pcre-8.30]# ldd $(which /usr/local/webserver/nginx/sbin/nginx)

linux-vdso.so.1 => (0x00007fff5dd56000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fa8c1857000)
libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007fa8c161f000)
libpcre.so.1 => not found
libssl.so.6 => /lib64/libssl.so.6 (0x00007fa8c13d3000)
libcrypto.so.6 => /lib64/libcrypto.so.6 (0x00007fa8c1082000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007fa8c0e7e000)
libz.so.1 => /lib64/libz.so.1 (0x00007fa8c0c6a000)
libc.so.6 => /lib64/libc.so.6 (0x00007fa8c0912000)
/lib64/ld-linux-x86-64.so.2 (0x00007fa8c1a72000)
libgssapi_krb5.so.2 => /usr/lib64/libgssapi_krb5.so.2 (0x00007fa8c06e4000)
libkrb5.so.3 => /usr/lib64/libkrb5.so.3 (0x00007fa8c044f000)
libcom_err.so.2 => /lib64/libcom_err.so.2 (0x00007fa8c024d000)
libk5crypto.so.3 => /usr/lib64/libk5crypto.so.3 (0x00007fa8c0028000)
libkrb5support.so.0 => /usr/lib64/libkrb5support.so.0 (0x00007fa8bfe20000)
libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x00007fa8bfc1e000)
libresolv.so.2 => /lib64/libresolv.so.2 (0x00007fa8bfa09000)
libselinux.so.1 => /lib64/libselinux.so.1 (0x00007fa8bf7f1000)
libsepol.so.1 => /lib64/libsepol.so.1 (0x00007fa8bf5ab000)

可以看出 libpcre.so.1 => not found 并没有找到,进入/lib64目录中手动链接下

[root@vps1 lib64]# ln -s libpcre.so.0.0.1 libpcre.so.1

之后启动正常。

日志信息 »

该日志于2012-02-06 17:36由 kevin 发表在技术合集分类下, 你可以发表评论。除了可以将这个日志以保留源地址及作者的情况下引用到你的网站或博客,还可以通过RSS 2.0订阅这个日志的所有评论。

5 条评论

  1. […] 转自:http://www.forzw.com/archives/652 […]

  2. tarfly说道:

    问题解决,支持下

  3. […] (configure failed: mhash_keygen in -lmhash… no) Quick install eAccelerator Installing nginx Nginx启动出错 如何设置nginx可以让ip可以直接访问网站。Related […]

发表回复