[uWSGI] Cannot compile uWSGI in CentOS 5.5 x86_64

Michael Kang wxiluo at gmail.com
Thu Nov 11 10:48:23 CET 2010

Hi all,

I'm deploying my python app on CentOS 5.5 x86_64 server. But I got
"error linking uWSGI" below:
*** uWSGI linking ***
gcc -pthread -o uwsgi  utils.o pyutils.o protocol.o socket.o logging.o
wsgi_handlers.o wsgi_headers.o uwsgi_handlers.o plugins.o main.o
uwsgi_pymodule.o async.o nagios.o ini.o proxy.o http.o snmp.o
sendfile.o xmlconf.o spooler.o -lpthread -rdynamic -lpthread -ldl
-lutil -lm -lpython2.6 -lxml2 -lz -lm
/usr/bin/ld: cannot find -lpython2.6
collect2: ld returned 1 exit status
*** error linking uWSGI ***
make: *** [all] Error 1

I install python 2.6.6 on my user home folder:
[mk at mk ]$ echo $HOME
[mk at mk ]$ ./configure --enable-shared --prefix=$HOME/py26
[mk at mk ]$ echo 'export LD_LIBRARY_PATH=$HOME/py26/lib'  >> ~/.bashrc
[mk at mk ]$ echo 'export PATH=$HOME/py26/bin:$PATH' >> ~/.bashrc
[mk at mk ]$ source .bashrc

... (install setuptool, pip ..)
[mk at mk ]$ pip install uwsgi-
I got the error which I show you above.

LD_LIBRARY_PATH="/home/mk/py26/lib" python2.6 uwsgiconfig.py --build
Doesn't work.

It seems uwsgi don't read the LD_LIBRARY_PATH env to find the shared
libs. What should I do to fix it?

Thank you

Michael Kang(康上明学)
There is a giant asleep within every man. When the giant
awakens,miracles happen.

Personal Blog: http://ufusion.org - United Fusion

More information about the uWSGI mailing list