先检查对应的库有没有安装:
https://www.jianshu.com/p/195e6e08f12e
然后去官网下载相关依赖和源码,开始安装相关依赖和nginx
https://blog.csdn.net/wjg8209/article/details/99304651
执行nginx发现报错:
error while loading shared libraries: libpcre.so.1: cannot open shared object file: No such file or directory
是因为pcre库的libpcre.so.1文件没有找到
先查找这个文件在哪
find / -name "ld.so.conf"
发现在/usr/local/lib/下有这个文件
于是将"/usr/local/lib"加到"/etc/ld.so.conf"文件中
echo "/usr/local/lib" >> /etc/ld.so.conf
使之立即生效
ldconfig
再启动nginx就正常了
网友评论