Error installing mod_wsgi in centos with python2.7
5,947
The important bit is to rebuild Python with --enable-shared. The symlink comments are not relevant if you haven't done that and should't even apply with recent Python/mod_WSGI versions.
Related videos on Youtube
Author by
Mirage
Updated on September 18, 2022Comments
-
Mirage over 1 year
When i do "make" in mod_wsgi folder i get this error
I configured using following
./configure --with-apxs=/usr/local/apache/bin/apxs --with-python=/opt/python27/bin/python
/usr/bin/ld: /opt/python27/lib/libpython2.7.a(node.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC /opt/python27/lib/libpython2.7.a: could not read symbols: Bad value collect2: ld returned 1 exit status apxs:Error: Command failed with rc=65536
This link has the solution but i could not understand it fully
1)How can i found that i have compiled x32bit or x64 bit version of python 2)I didn't understand about what symbolic link he was talking about
-
Mirage about 13 yearsI tried that , i reinstalled with --enabled shared and same thing happens . how can i check that if enabled shared actually installed or not. i did this
./configure --prefix=/opt/python27 --enable-shared
is there any way to confirm that -
Mirage about 13 yearsI could not found that file i can see this file in both locations
libpython2.7.a
. If file is not there does it means that i have to recompile python again. i remembered i used --enabled shared option -
Graham Dumpleton about 13 yearsIt means that what was installed didn't have shared library support enabled when it was built. Ensure that when you rebuild that you run 'make distclean' first before running 'configure' again and include '--enable-shared' in the options to 'configure'. You might even rename '/opt/python2.7' to '/opt/python2.7.static' while you do it to ensure that it recreates it and that installed version not causing problems.
-
Mirage about 13 yearsthanks graham , mod_wsgi is installed now. i din't knew i had to use
make distclean
thanks