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.

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? Commented Nov 9, 2018 at 9:10

6 Answers 6

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

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.

1
  • This worked for me. This seems to be caused by pip installed uwsgi.
    – AmaChefe
    Commented Sep 14, 2022 at 14:47
1

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

plugins-dir = /usr/lib64/uwsgi
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.

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.

3
  • 1
    using the plugins-dir option still gives me exactly the same error (with ./python3_plugin.so being mentioned). Commented Mar 1, 2019 at 14:22
  • what if you copy (just for test) python3_plugin.so to current directory?
    – Ron Kalian
    Commented Mar 1, 2019 at 15:13
  • 1
    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/438 Commented Mar 1, 2019 at 17:03
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.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.