linux's docs

25.5.0: LNMP-nginx启动报错


0. nginx启动报错

问题1

错误信息:

# /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

解决方案

# find /usr/ -name libpcre.so.1
/usr/local/src/apache_install/pcre-8.36/.libs/libpcre.so.1
/usr/local/lib/libpcre.so.1
# ln -s /usr/local/lib/libpcre.so.1 /usr/lib/libpcre.so.1

问题2

错误信息:

error while loading shared libraries: liblua5.1.so.2: cannot open shared object file: No such file or directory

解决方案:

  1. 尝试安装lua-devel,若已安装,运行"rpm -ql lua |grep .so" 查看下输出结果
  2. 尝试给liblua5.1.so做软连接,软连接的名称跟错误中的一致,本例中就是liblua5.1.so.2

Contents