uwsgi启动报错:uwsgi: error while loading shared libraries: libpcre.so.1: cannot open shared object file

uwsgi启动报错:uwsgi: error while loading shared libraries: libpcre.so.1: cannot open shared object file,第1张

问题描述

在启动uwsgi时,提示以下错误:

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

意思是没找到libpcre.so.1文件

可能是因为使用了anaconda,导致lib文件不在uwsgi的加载目录中导致的

解决方案

首先使用find / -name libpcre.so.1 命令,找到libpcre.so.1文件的位置,如:

/home/ubuntu/anaconda3/lib/libpcre.so.1
/home/ubuntu/anaconda3/pkgs/pcre-8.44-he6710b0_0/lib/libpcre.so.1
find: ‘/etc/polkit-1/localauthority’: Permission denied
find: ‘/etc/ssl/private’: Permission denied
find: ‘/opt/containerd’: Permission denied
find: ‘/root’: Permission denied

然后使用ldconfig命令,加载将文件所在目录,就可以了:
sudo ldconfig /home/ubuntu/anaconda3/lib
uwsgi --version

或者在运行uwsgi的命令之前,加上LD_LIBRARY_PATH,如:
LD_LIBRARY_PATH=/home/ubuntu/anaconda3/lib uwsgi --version

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/langs/869276.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-13
下一篇2022-05-13

发表评论

登录后才能评论

评论列表(0条)

    保存