尝试使用python-3.4.1编译lxml 3.3.3时,gcc失败了,错误为
gcc -pthread -Wno-unused-result -Werror=declaration-after-statement -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/include/libxml2 -I/home/jeby6372/pack/lxml-3.3.4/src/lxml/includes -I/opt/python3/include/python3.4m -c src/lxml/lxml.etree.c -o build/temp.linux-x86_64-3.4/src/lxml/lxml.etree.o -w
gcc -pthread -shared build/temp.linux-x86_64-3.4/src/lxml/lxml.etree.o -L/usr/lib -L. -lxslt -lexslt -lxml2 -lz -lm -lpython3.4m -o build/lib.linux-x86_64-3.4/lxml/etree.cpython-34m.so
/usr/bin/ld: cannot find -lpython3.4m
collect2: error: ld returned 1 exit status
error: command 'gcc' failed with exit status 1有什么想法吗?
注意:我在尝试编译netiface-0.10.3时也遇到了同样的问题,而且可能是用其他python3包编译的
发布于 2014-07-22 05:57:30
在pyvenv (python虚拟环境)中运行$ pip install psycopg2时,我遇到了完全相同的错误。问题的根源是我制作的pyvenv是错误的,因此路径都是错误的。
我创建了一个新的pyvenv并重新启动了这个过程,一切都很顺利。
我希望这会对您有所帮助:)
https://stackoverflow.com/questions/24275008
复制相似问题