ubuntu18.04 安装niginx踩坑

1.linux 安装pcre报错“You need a C++ compiler for C++ support.”解决办法

解决:

sudo apt-get install build-essential

 

2.Nginx启动出错“/nginx: error while loading shared libraries: libpcre.so.1: cannot open shared object file: No such file or directory”

解决办法:

由于我已经安装CRE,且存在libpcre.so.1

因此在/usr/local/lib下,设置  LD_LIBRARY_PATH

export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH

 

posted @ 2022-02-05 02:26  AlexFung  阅读(56)  评论(0)    收藏  举报