转载自:http://blog.csdn.net/wang1144/article/details/42277179

在ubuntu14.04版本上安装lxml,老是出错,在一番艰辛的搜索之后 ,终于找出了安装的正确方法,其实也就是没有将依赖包装全:

sudo apt-get install libxml2-dev libxslt1-dev python-dev
sudo apt-get install zlib1g-dev
sudo apt-get install libevent-dev
sudo pip install lxml

中途执行pip install lxml可能遇到识别不正确的情况,需要apt-get update一下方可继续

参考网址:

http://lxml.de/installation.html

http://blog.marchtea.com/archives/104

http://blog.marchtea.com/archives/91

下面是之前的参考,也可能会安装成功

sudo apt-get install Python-twisted-web python2.7-dev

安装 pip :

$ wget https://bootstrap.pypa.io/get-pip.py
... $ sudo python get-pip.py install

使用 pip 安装/升级 lxml(升至 3.3.5) 时出现以下报错:

"error: command 'x86_64-linux-gnu-gcc' failed with exit status 1"

这是因为一些依赖包没有安装,可以使用以下命令更新依赖包:

$sudo apt-get build-dep python-lxml

在更新完依赖包后,再次执行 pip 安装:

$ sudo pip install lxml --upgrade

error: command 'x86_64-linux-gnu-gcc' failed with exit status 1的更多相关文章

  1. Centos4.3安装MySQL-python-1.2.3,出现error: command 'gcc' failed with exit status 1

    在Linux Centos 4.3上安装MySQL-python-1.2.3的时候出现error: command 'gcc' failed with exit status 1, 具体原因是因为没有 ...

  2. error: command 'gcc' failed with exit status 1

    MacOS下想安装MySQL-Python,执行语句: sudo pip install MySQL-Python 遇到了如下错误信息: /Users/kaitlyn/anaconda3/envs/e ...

  3. pip error: command 'gcc' failed with exit status 1

    SWIG/_m2crypto_wrap.c:127:20: 致命错误:Python.h:没有那个文件或目录     #include <Python.h>                  ...

  4. mysql_config not found和error: command 'gcc' failed with exit status 1

    要想使python可以操作mysql 就需要MySQL-python驱动,它是python 操作mysql必不可少的模块. 下载地址:https://pypi.python.org/pypi/MySQ ...

  5. 【centos】 error: command 'gcc' failed with exit status 1

    原文连接http://blog.csdn.net/fenglifeng1987/article/details/38057193 用安装Python模块出现error: command 'gcc' f ...

  6. centos7 安装mysql--python模块出现EnvironmentError: mysql_config not found和error: command 'gcc' failed with exit status 1

    要想使python可以操作mysql 就需要MySQL-python驱动,它是python 操作mysql必不可少的模块. 下载地址:https://pypi.python.org/pypi/MySQ ...

  7. python安装模块的时候报错error: command 'gcc' failed with exit status 1

    [情况] 在写Python代码的时候,需要用到psutil模块,需要安装. 但是在安装时,报错:error: command 'gcc' failed with exit status 1 [解决步骤 ...

  8. pip安装模块时:error: command 'gcc' failed with exit status 1

    用安装python模块出现error: command 'gcc' failed with exit status 1 问题: gcc编译缺少模块 解决方法: yum install gcc libf ...

  9. python psutil 编译中断。 error: command 'gcc' failed with exit status 1

    error info [root@chenbj psutil-2.0.0]# python setup.py install running install running bdist_egg run ...

  10. pycuda installation error: command 'gcc' failed with exit status 1

    原文:python采坑之路 Setup script exited with error: command 'gcc' failed with exit status 1 伴随出现"cuda ...

随机推荐

  1. C#: 数据绑定

    数据绑定是分离UI和后端主逻辑程序的一种好的办法.这里总结下TextBox, Label, ComboBox, ListBox, DataGridView的数据绑定 数据绑定都是通过DB来和UI控件的 ...

  2. &nbsp|&quot|&amp|&lt|&gt等html字符转义

    提示:请直接按CTRL+F搜索您要查找的转义字符.    原文地址:http://write.blog.csdn.net/postedit/8817826 常用表: No. 文字表記 10進表記 16 ...

  3. mysql之触发器before和after的区别

    我们先做个测试: 接上篇日志建的商品表g和订单表o和触发器 假设:假设商品表有商品1,数量是10: 我们往订单表插入一条记录: insert into o(gid,much) values(1,20) ...

  4. Codeforces Round #312 (Div. 2) E. A Simple Task

    题目大意就是给一个字符串,然后多个操作,每次操作可以把每一段区间的字符进行升序或者降序排序,问最终的字符串是多少. 一开始只考虑字符串中字符'a'的情况,假设操作区间[L,R]中有x个'a',那么一次 ...

  5. CCSprite的使用方法大全

    一.精灵创建及初始化 1.从图片文件创建: CCSprite *sprite = [CCSprite spriteWithFile:@"ImageFileName.png"]; 默 ...

  6. 大数据量的csv文件如何导入到 sql 数据库

    BULK INSERT dbo.T_test001 FROM 'E:\bus_20160316\bus全量评级及借款编号_20160316.csv' WITH ( FIELDTERMINATOR =' ...

  7. u盘安装centos

    1. 下载centos系统2. 使用UltraISO制作u盘启动.制作方法:http://jingyan.baidu.com/article/a378c960630e61b329283045.html ...

  8. Perl中的匹配(六)

    在Perl中,匹配的定界符如果是双斜线//,可以直接使用双斜线完成匹配操作. 如果特定条件下需要改变定界符,如改为{},[]等.需要加入m,m{},m[]等. m%^http://% 默认的模式匹配对 ...

  9. PAT乙级 1014. 福尔摩斯的约会 (20)

    1014. 福尔摩斯的约会 (20) 时间限制 100 ms 内存限制 65536 kB 代码长度限制 8000 B 判题程序 Standard 作者 CHEN, Yue 大侦探福尔摩斯接到一张奇怪的 ...

  10. MyEclipse启动失败

    日志的一部分: !SESSION 2014-09-24 11:47:03.156 -----------------------------------------------eclipse.buil ...