问题解决:UNABLE to load uWSGI plugin: ./python_plugin.so

运行uwsgi时出错:

open("./python_plugin.so"): No such file or directory [core/utils.c line 3713]

UNABLE to load uWSGI plugin: ./python_plugin.so: cannot open shared object file: No such file or directory!

原因:这可能是uwsgi的配置问题

解决:1. 若是使用的uwsgi 的配置文件是 .ini 类型时,注释 

# plugin = python

2. 若是配置文件是 .xml 类型时,删除 <plugin>python</plugin> 。

3. 其他配置文件类型还有 .json 及 .yaml 文件。

4. 若是以上配置文件没问题,那么就是没有安装好 uwsgi 或者uwsgi 服务没有启动,启动uwsgi 服务:

systemctl start uwsgi

再次运行命令是否可行。若还是不可行,那么按照以下步骤:

首先查询是否已存在uwsgi,并卸载:

rpm -qa|grep uwsgi
yum remove -y uwsgi*

若之前是pip 安装的话,执行:

pip uninstall uwsgi

重新安装:

Ubuntu 的Python3 :

apt-get install -y uwsgi-plugin-python3

注:这里可能还有个所有可用的plugin:sudo apt-get install uwsgi-plugins-all

centos环境:

sudo yum install -y uwsgi-plugin-python

查看 uwsgi 服务是否启动:

systemctl status uwsgi

若没有则启动之。

那么这样再次运行uwsgi 相关命令应该是问题不大了。

猜你喜欢

转载自blog.csdn.net/ANXIN997483092/article/details/81066078
今日推荐