无法加载 uWSGI 插件

UNABLE to load uWSGI plugin

我想在我的项目中使用 python3.4,但出现错误:

!!!无法加载 uWSGI 插件:./python34_plugin.so: undefined symbol: spool_request !!!

我在目录中有该文件,但它无法正常工作。

uwsgi

#mysite_uwsgi.ini file
[uwsgi]

# Django-related settings
# the base directory (full path)
chdir           = /data/mysite/project
# Django's wsgi file
wsgi-file       = /data/mysite/project/mysite/wsgi.py
# the virtualenv (full path)
home            = /data/mysite/venv/pt3
# master
master          = True
plugins-dir     = /usr/lib/uwsgi/plugins
plugins         = python34
# maximum number of worker processes
processes       = 5
# the socket
socket          = /tmp/mysite.sock
# ... with appropriate permissions - may be needed
chmod-socket    = 666
# clear environment on exit
vacuum          = true
# account to start process
uid             = root
gid             = root
# Output messages to log
daemonize=/var/log/uwsgi/mysite.log

PS。对不起我的英语

您可能使用了不同的 uWSGI 构建配置文件或源代码版本来构建您的 python 插件和 uwsgi 二进制文件。

要解决该问题,请克隆您要使用的 uWSGI 版本的源代码并编译它和适当的插件:

make buildprofile
PYTHON=python3.4 ./uwsgi --build-plugin "plugins/python python34"

这样做之后,停止系统中的所有 uWSGI 服务器,用新构建的替换系统中的 uWSGI 二进制文件,用新的替换 python 3.4 的插件并再次启动 uWSGI。