在CentOS (fc10) 上用Python2.6无法编译uWSGI
这个程序通常是用Python 2.5版本构建的,但我需要用2.6版本!
2.6版本通常安装在/opt/python26目录下,并且在控制台中可以成功运行为python2.6。
但是
python2.6 uwsgiconfig.py --build
给我带来了问题
*** uWSGI linking ***
/usr/bin/ld: cannot find -lpython2.6
collect2: ld returned 1 exit status
求助!
2 个回答
0
编辑 uwsgiconfig.py 文件,把 PYLIB_PATH 设置为 Python 库目录的路径。
1
试试这个:
LD_LIBRARY_PATH="/somepath/" python2.6 uwsgiconfig.py --build
其中 somepath
是你 libpython2.6.so.x
文件的路径。
接下来,更新你的 /etc/ld.so.conf
文件,把库的路径加进去,然后运行 ldconfig
。