要死了, pip install lxml 老是错误,求解答

2016-01-13 19:23:43 +08:00
 aliehuhu
gcc: 内部错误:已杀死 (程序 cc1)
请提交一份完整的错误报告。
具体步骤请参见 <http://bugzilla.redhat.com/bugzilla>。
Compile failed: command 'gcc' failed with exit status 1
cc -I/usr/include/libxml2 -I/usr/include/libxml2 -c /tmp/xmlXPathInit2n9hsr8u.c -o tmp/xmlXPathInit2n9hsr8u.o
cc tmp/xmlXPathInit2n9hsr8u.o -L/usr/lib64 -lxml2 -o a.out
error: command 'gcc' failed with exit status 1

----------------------------------------
Command "/usr/local/bin/python3.5 -c "import setuptools, tokenize;__file__='/tmp/pip-build-naxwm8_v/lxml/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-pm50syyl-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-naxwm8_v/lxml
[root@vps ~]# pip list
beautifulsoup4 (4.4.1)
pip (7.1.2)
setuptools (19.2)
wheel (0.26.0)
[root@vps ~]#
7524 次点击
所在节点    Python
24 条回复
liuxu
2016-01-14 12:55:04 +08:00
咋一看是 gcc 编译是有问题,/usr/lib64 下面没有 lxml2.so ?这个要装 lib 包吧,像 liblxml2 之类的。我 ubuntu 的 apt 查了一下,有 libxml2-dev 这个包,你用 yum install libxml2-dev 也应该有,应该需要装这个了。
Douglee
2016-01-14 17:13:12 +08:00
找一个 whl 文件,然后再用 pip 安装,我就是这么搞定的
win7x64 + python3.4
pkking
2016-01-14 17:28:50 +08:00
cc -I/usr/include/libxml2 -I/usr/include/libxml2 -c /tmp/xmlXPathInit2n9hsr8u.c -o tmp/xmlXPathInit2n9hsr8u.o
cc tmp/xmlXPathInit2n9hsr8u.o -L/usr/lib64 -lxml2 -o a.out

建议手动执行下 看看报错是什么
zonghua
2016-03-16 22:11:27 +08:00
一个冷门的包 Django-webodt 还是没办法正常安装啊

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/250528

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX