我正在尝试安装pillow。当我执行pip install pillow
时。我收到了这个错误。
/usr/bin/ld: skipping incompatible /usr/lib/libpython2.6.so when searching for -lpython2.6
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../libpython2.6.so when searching for -lpython2.6
/usr/bin/ld: skipping incompatible /usr/lib/libpython2.6.so when searching for -lpython2.6
/usr/bin/ld: cannot find -lpython2.6
collect2: ld returned 1 exit status
error: command 'gcc' failed with exit status 1
----------------------------------------
Cleaning up...
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip_build_root/pillow/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-8cOUEu-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_root/pillow
Traceback (most recent call last):
File "/usr/bin/pip", line 9, in <module>
load_entry_point('pip==1.5.5', 'console_scripts', 'pip')()
File "/usr/lib/python2.6/site-packages/pip-1.5.5-py2.6.egg/pip/__init__.py", line 185, in main
return command.main(cmd_args)
File "/usr/lib/python2.6/site-packages/pip-1.5.5-py2.6.egg/pip/basecommand.py", line 161, in main
text = '\n'.join(complete_log)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 35: ordinal not in range(128)
[root@people ~]#
根据这个answer,我试图找出libpython。我明白了
[root@people ~]# locate libpython
/root/Python-2.7.6/Tools/gdb/libpython.py
/usr/lib64/libpython2.6.so.1.0
/usr/local/lib/libpython2.7.a
/usr/local/lib/python2.7/config/libpython2.7.a
/usr/share/systemtap/tapset/libpython2.6-64.stp
现在应该如何链接它?
答案 0 :(得分:2)
尝试安装Python的开发库,你可能只获得了运行时(例如/usr/lib64/libpython2.6.so.1.0)。