一、前言
关于centos的linux系统下启动nginx(安装步骤参见其他文章内容)报"/app/nginx/sbin/nginx: error while loading shared libraries: libpcre.so.1: cannot open shared object file: No such file or directory"错误提示,启动步骤如下(nginx安装步骤参见其他文章页面)>>
[root@raid2t sbin]# /app/nginx/sbin/nginx -v@b@/app/nginx/sbin/nginx: error while loading shared libraries: libpcre.so.1: cannot open shared object file: No such file or directory@b@[root@raid2t sbin]#
二、解决方法
[root@raid2t lib]# find / -type f -name *libpcre.so.* @b@/usr/local/lib/libpcre.so.1.2.3@b@/home/soft/pcre-8.35/.libs/libpcre.so.1.2.3@b@/lib64/libpcre.so.0.0.1@b@[root@raid2t lib]# ln -s /lib64/libpcre.so.0.0.1 /lib64/libpcre.so.1@b@You have mail in /var/spool/mail/root@b@[root@raid2t lib]#
验证结果如下,说明启动正常
[root@raid2t sbin]# ./nginx @b@ @b@[root@raid2t sbin]# wget http://localhost/index.html@b@--2018-08-29 00:19:23-- http://localhost/index.html@b@正在解析主机 localhost... ::1, 127.0.0.1