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

17.2k Views Asked by At

On my Fedora workstation, I'm getting this error:

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

But on the server (CentOS Linux) it works fine.

To get around this, I need to say this in my uwsgi.ini file

plugins-dir = /usr/lib64/uwsgi/
plugins = python3

But on the server, I can just do this:

plugins = python3

On my workstation, I did uninstall/reinstall uwsgi using dnf. I do have the python plugin installed in the /usr/lib64/uwsgi folder. It came from dnf install uwsgi-plugin-python3

I'm confused.

6

There are 6 best solutions below

0
On

In my case, the plugins-dir was this one: /usr/lib/uwsgi/plugins So I added:

plugins-dir = /usr/lib/uwsgi/plugins

and it worked for me. Maybe it can be helpful for someone else.

0
On

It seems that you should remove last '/' from plugins-dir, so it should be like this

plugins-dir = /usr/lib64/uwsgi
3
On

It seems the hint is in the error message:

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

It looks for the plugin in the current directory ./python3_plugin.so and doesn't look in the default directory /usr/lib64/uwsgi/ unless told to do so explicitly in uwsgi.ini. Typically Fedora and centOS, although both RedHat variants, will be different versions. Fedora will contain more 'leading-edge' features than RedHat. CentOS is an open source variant of RedHat. Expect Fedora.version > CentOS.version. Somewhere between the 2 versions, the default for plugins-dir must have disappeared.

0
On

This worked for me. Example path: (Note: No / at the end)

plugins-dir = /usr/local/lib/uwsgi

plugins         = python37

and make sure that your python37_plugin.so file is inside the /usr/local/lib/uwsgi folder

1
On

I had a similar problem.

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

"uwsgi.ini"

plugins-dir = /usr/lib/uwsgi/plugins
plugins = python3

"Check if plugin exists"

find / -path /mnt -prune -o -name python3_plugin.so 2>/dev/null

/usr/lib/uwsgi/plugins/python3_plugin.so

I solved it in the following way

"uwsgi.ini"

plugins = /usr/lib/uwsgi/plugins/python3

Most of the answers to solve this problem did not help my situation, but it was solved by directly specifying the path in the "uwsgi.ini" plugins.

Hope this helps if you are in a similar situation to me.

0
On

When I deploy the uwsgi project on the pipeline, I find this problem. My solution is to install uwsgi-plugin-pytho3 and set plugins-dir plugins on .ini, and redirect output to a file, which may be caused by the pipeline.