shangma / modwsgi

Automatically exported from code.google.com/p/modwsgi
0 stars 0 forks source link

Cannot load modules/mod_wsgi.so into server: /usr/local/apache2/modules/mod_wsgi.so: undefined symbol: _Py_ZeroStruct #306

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
LoadModule wsgi_module modules/mod_wsgi.so

apachectl restart
httpd: Syntax error on line 150 of /usr/local/apache2/conf/httpd.conf: Cannot 
load modules/mod_wsgi.so into server: /usr/local/apache2/modules/mod_wsgi.so: 
undefined symbol: _Py_ZeroStruct

Original issue reported on code.google.com by Igha...@gmail.com on 14 Sep 2013 at 3:35

GoogleCodeExporter commented 9 years ago
What version of mod_wsgi are you using?

What version of Python was mod_wsgi compiled against and where was it installed 
on your system?

Do you have system wide Python versions installed and if so what versions?

Anyway, I believe this may be caused by mod_wsgi being compiled for a different 
version of Python than mod_wsgi is finding at time time.

For example, if you compiled mod_wsgi against Python 2.7.2 under /usr/local, 
but you had a system wide Python installed which was only 2.7.1 and it was the 
Python shared library which was found at run time.

You should run:

ldd mod_wsgi.so

where mod_wsgi.so is the installed mod_wsgi module in Apache modules directory.

When running this LD_LIBRARY_PATH should not be set as a user environment 
variable.

If the libpythonX.Y.so found is not from the Python installation you compiled 
mod_wsgi against, you can have problems.

In this case you should do a 'make distclean' in mod_wsgi source code and 
recompile it again. This time set the LD_RUN_PATH environment variable and 
export it, which the value of it set to be the directory where the 
libpythonX.Y.so for the actual Python version you compiled mod_wsgi against is 
located.

You only need set LD_RUN_PATH when mod_wsgi is compiled as this will cause the 
directory where the correct libpythonX.Y.so is located to be embedded into the 
mod_wsgi.so. You can validate by running ldd again.

Original comment by Graham.Dumpleton@gmail.com on 15 Sep 2013 at 9:57

GoogleCodeExporter commented 9 years ago
Closing and issues was never followed up by user.

Original comment by Graham.Dumpleton@gmail.com on 16 Sep 2014 at 6:50