linux下部署Django uwsgi: error while loading shared libraries: libpcre.so.1: cannot open shared object file: No such file or directory
在ubuntu下部署Django服务,使用uwsgi时报错
命令:uwsgi --http :8001 --wsgi-file test.py
报错信息:uwsgi: error while loading shared libraries: libpcre.so.1: cannot open shared object file: No such file or directory
解决方式:
sudo apt-get install libpcre3 libpcre3-dev # 安装需要的包
find / -name libpcre.so.3 # 找到libpcre.so.3(一般在根目录/lib/x86_64-linux-gnu下)
找到 /lib/x86_64-linux-gnu/libpcre.so.3
sudo ln -s /lib/x86_64-linux-gnu/libpcre.so.3 /usr/lib/libpcre.so.1 # 做软链接即可