Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Problems compling mod_wsgi with apache

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?

like image 628
Rodrigo Avatar asked Jul 20 '26 07:07

Rodrigo


1 Answers

This is covered in the mod_wsgi documentation.

  • http://code.google.com/p/modwsgi/wiki/InstallationIssues

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.

like image 58
Graham Dumpleton Avatar answered Jul 22 '26 00:07

Graham Dumpleton



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!