【发布时间】:2021-04-08 03:08:58
【问题描述】:
我通过以下步骤尝试启动应用以进行生产:
-Setup a virtualenv for the python dependencies: virtualenv -p /usr/bin/python3.8 ~/app_env
-Install pip dependencies: . ~/app_env/bin/activate && pip install -r ~/app/requirements.txt
-Un-comment the lines for privilege dropping in uwsgi.ini and change the uid and gid to your account name
-Login to root with sudo -s and re-source the env with source /home/usr/app_env/bin/activate
-Set the courthouse to production mode by setting the environment variable with export PRODUCTION=1
-Start the app: cd /home/usr/app && ./start_script.sh
我收到以下错误:
(app_env) root@usr-Spin-SP314-53N:/home/usr/Desktop/app# ./start.sh
uwsgi: error while loading shared libraries: libpcre.so.1: cannot open shared object file: No such file or directory
我尝试了一些方法,例如安装更新的 libpcre 版本,如提到的 here,也尝试了提到的步骤 here,但没有奏效。此外,我正在设置的环境不使用 anaconda,而是使用常规 python。我什至在我的虚拟环境中尝试了pip install uwsgi ,但它说要求已经得到满足。当涉及到像这样复杂的包管理时,我不是专家,我们将不胜感激如何解决这个问题。谢谢。我在 Ubuntu 20.04 上,使用 python 3.8。
【问题讨论】:
标签: python-3.x virtualenv wsgi pcre