1👍
This error generally occurs when the Python version with which the mod_wsgi
is compiled is not compatible with Django version being used.
It appears you are using Django 1.8. Now, Django 1.8 is compatible with Python 2.7 or above. Apparently, the Python version with which your mod_wsgi
is compiled is <2.7.
The mod_wsgi
package is compiled for a specific Python version and linked via a shared library.
From the mod_wsgi
docs:
When
mod_wsgi
is built, the'mod_wsgi.so'
file should be linked
against Python via a shared library. If it isn’t and it is linked
against a static library, various issues can arise.
What you need to do?
You need to check with what Python version, your mod_wsgi
is compiled with. If your Python version with which mod_wsgi
is linked is <2.7, you will need to recompile your mod_wsgi
with Python versions>= 2.7.
How to check the mod_wsgi
compiled Python version?
You can try running the ldd
command and check the output.
Sample output:
$ ldd mod_wsgi.so
linux-vdso.so.1 => (0x00007fffeb3fe000)
libpython2.5.so.1.0 => /usr/local/lib/libpython2.5.so.1.0 (0x00002adebf94d000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00002adebfcba000)
libdl.so.2 => /lib/libdl.so.2 (0x00002adebfed6000)
libutil.so.1 => /lib/libutil.so.1 (0x00002adec00da000)
libc.so.6 => /lib/libc.so.6 (0x00002adec02dd000)
libm.so.6 => /lib/libm.so.6 (0x00002adec0635000)
/lib64/ld-linux-x86-64.so.2 (0x0000555555554000)
Also, here’s the official link for checking your mod_wsgi
installation.