gpt4 book ai didi

django - uWSGI 找不到 python3 插件 - 打开 ("./python3_plugin.so") : No such file or directory

转载 作者:行者123 更新时间:2023-12-04 18:39:08 26 4
gpt4 key购买 nike

我已经尝试了 stackoverflow 中的所有解决方案,但仍然找不到适合我的解决方案。
正如您在 pluginsdir 中看到的那样,python3 插件可用,但 uwsgi 说它不可用。
[uwsgi]ini文件

[uwsgi]
vhost = true
plugins-dir = /usr/lib/uwsgi/plugins
plugins = python3
socket = /var/run/domain.org.sock
master = true
enable-threads = true
processes = 2
wsgi-file = /var/www/domain.org/config/wsgi.py
virtualenv = /var/www/domain.org/env
chdir = /var/www/domain.org
ls -la/usr/lib/uwsgi/plugins
drwxr-xr-x 2 root root   4096 Dec 18 21:44 .
drwxr-xr-x 3 root root 4096 Dec 18 21:44 ..
...
-rw-r--r-- 1 root root 199896 Apr 11 2020 python38_plugin.so
lrwxrwxrwx 1 root root 38 Dec 18 21:44 python3_plugin.so -> /etc/alternatives/uwsgi-plugin-python3
uwsgi --ini/etc/uwsgi/apps-available/domain.org.ini
[uWSGI] getting INI configuration from /etc/uwsgi/apps-available/domain.org.ini
open("./python3_plugin.so"): No such file or directory [core/utils.c line 3732]
!!! UNABLE to load uWSGI plugin: ./python3_plugin.so: cannot open shared object file: No such file or directory !!!
*** Starting uWSGI 2.0.19.1 (64bit) on [Fri Dec 18 21:52:29 2020] ***
compiled with version: 9.3.0 on 18 December 2020 13:15:35

最佳答案

安装后,尝试导出并启用python插件,如;

export PYTHON=python3.8
uwsgi --build-plugin "/usr/src/uwsgi/plugins/python python38"
比将插件文件移动到相关目录;
mv python38_plugin.so /usr/lib/uwsgi/plugins/python38_plugin.so
chmod 644 /usr/lib/uwsgi/plugins/python38_plugin.so
您可以使用以下命令测试该插件是否启用;
uwsgi --plugin python38 -s :0
你应该看到类似的东西;
Python version: 3.8xxx
Ps:如果您遇到诸如“权限被拒绝”之类的错误,请不要忘记在所有命令中添加 sudo。

关于django - uWSGI 找不到 python3 插件 - 打开 ("./python3_plugin.so") : No such file or directory,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65362467/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com