mod_wsgi: mod_wsgi.so: cannot open shared object file: No such file or directory
Hi,
i have compiled the latest release today and when im trying to restart the apache server the following is promted to the console:
apache2: Syntax error on line 230 of /etc/apache2/apache2.conf: Syntax error on line 2 of /etc/apache2/httpd.conf: Cannot load modules/mod_wsgi.so into server: /etc/apache2/modules/mod_wsgi.so: cannot open shared object file: No such file or directory
inside my apache2.conf i import my httpd.conf file:
# load  and configure mod_wsgi:
LoadModule wsgi_module modules/mod_wsgi.so
WSGIScriptAlias /mapproxy /mnt/0a0caead-2478-405e-9924-90617b1656f7/itvs_osm/itvs_wmts/conf/config.py
WSGIApplicationGroup %{GLOBAL}
<Directory /mnt/0a0caead-2478-405e-9924-90617b1656f7/itvs_osm/itvs_wmts/> 
    #Allow from all
    Order Deny,allow
    Require all granted
</Directory>
I installed apacha via https://www.digitalocean.com/community/tutorials/how-to-install-the-apache-web-server-on-ubuntu-18-04
where is my error?
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 27 (13 by maintainers)
For whatever reason, your Apache installation isn’t set up such that
modulesis a sub directory of the Apache root directory. You will need to use:The message is saying it can’t find
libpython3.7m.so.1.0not themod_wsgi.sofile. See:In short, you are trying to use a Python installation in a non standard location, so you need to tell the build where it is. You can also fudge things by adding:
before the
LoadModuleline, where/some/pathis replaced with the directory where Python library was installed.You may also need to set
WSGIPythonHomedirectory to be whatsys.prefixis set to for Python since not in standard location.Thank you Graham LoadFile worked fine RHEL
I was able to build MOD_WSGI and restart the Apache successfully. As you mentioned, it took adding
LoadFileinto themod_wsgi.loadfile to get the thing working properly. Copying Python library’s shared object file into/lib,/usr/lib,/usr/local/libhad no effect.