I have a centos 6 server, and I'm trying to configure apache + wsgi + django but I can't. As I have Python 2.6 for my system and I using Python2.7.5, I can't install wit yum. I was dowload a tar file and try to compile using:
./configure --with-python=/usr/local/bin/python2.7
But not works. Systems respond:
/usr/bin/ld: /usr/local/lib/libpython2.7.a(abstract.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC
I don't understand where I have to use -fPIC. I'm execute:
./configure -fPIC --with-python=/usr/local/bin/python2.7
But not works.
Can anyone help me?
This is covered in the mod_wsgi documentation.
Your Python installation wasn't configured with the --enable-shared option when it was built. You cannot workaround it at the time of building mod_wsgi. Your Python installation needs to be reinstalled with the correct configure option.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With