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
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.
Re-compile Python
Re-compiling Python with
--enable-shared
alone is not enough, because you'll get error while loading shared libraries.Supposed that you will install Python 2.7.x in
/usr/local/bin
, you should configure it withLDFLAGS
option:(Use
altinstall
instead ofinstall
to avoid changing symbolic links of system Python and man pages. In short,install
=altinstall
+bininstall
+maninstall
)Compile
mod_wsgi
Supposed that (a compiled version of) Apache is installed in
/usr/local/apache
, compilemod_wsgi
against Python 2.7 like this:If you compile
mod_wsgi
withoutLDFLAGS
, Apache will complain: