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

6

21

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.

Malamud answered 8/1, 2017 at 17:1 Comment(1)
To clarify, are you getting the error after you have edited your uwsgi.ini file as indicated? Or did you get the error before that, your changes fixed it, and just want to know why your changes fixed it?Making
O
2

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

Oshea answered 23/2, 2020 at 9:42 Comment(0)
F
2

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.

Freberg answered 8/8, 2022 at 17:10 Comment(1)
This worked for me. This seems to be caused by pip installed uwsgi.Meridional
G
1

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

plugins-dir = /usr/lib64/uwsgi
Gaidano answered 9/3, 2021 at 12:22 Comment(0)
R
1

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.

Revisory answered 12/5, 2021 at 10:55 Comment(0)
C
0

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.

Complimentary answered 26/2, 2019 at 15:58 Comment(3)
using the plugins-dir option still gives me exactly the same error (with ./python3_plugin.so being mentioned).Haught
what if you copy (just for test) python3_plugin.so to current directory?Complimentary
That doesn't work either. Strange. I have a chdir specified in the uwsgi config, but even if I place the .so there it doesn't work. I have no idea where uwsgi is actually looking. I made a github issue: github.com/unbit/uwsgi-docs/issues/438Haught
A
0

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.

Alpers answered 22/5, 2023 at 23:40 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.