转载自: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. 01分数规划poj2728(最优比例生成树)

    Desert King Time Limit: 3000MS   Memory Limit: 65536K Total Submissions: 21766   Accepted: 6087 Desc ...

  2. Java基础(33):StringBuilder的方法与应用实例(String相关类)

    Java 中的 StringBuilder 类的常用方法 重要的事情说三遍: 在需要频繁对字符串进行修改操作时使用 StringBuilder 的效率比 String 要高 在需要频繁对字符串进行修改 ...

  3. C#:线程

    http://www.cnblogs.com/leslies2/archive/2012/02/07/2310495.html 4.4委托类没看懂 http://www.cnblogs.com/les ...

  4. Extjs treePanel 后台Json的两种构建方法

    public string json = ""; public string QueryMenuTreeJson(string ParentID, string userId) { ...

  5. 。。。HibernateTemplate与Session。。。

    今天在学习Spring框架的时候,突然发现了这个类----HibernateTemplate,这个类与Session一开始认为是差不多的,这个HibernateTemplate类对象拥有Session ...

  6. sql 中各种锁随记

    一. 为什么要引入锁    多个用户同时对数据库的并发操作时会带来以下数据不一致的问题:    丢失更新  A,B两个用户读同一数据并进行修改,其中一个用户的修改结果破坏了另一个修改的结果,比如订票系 ...

  7. Mysql自定义函数总结

    存储函数 创建存储函数,需要使用CREATE FUNCTION语句,基本语法如下: CREATE FUNCTION func_name([func_parameter]) RETURNS TYPE [ ...

  8. SQL 中常见的系统存储过程

    -- 来源于网络 -- 更详细的介结参考联机帮助文档 xp_cmdshell --*执行DOS各种命令,结果以文本行返回. xp_fixeddrives --*查询各磁盘/分区可用空间 xp_logi ...

  9. VS2010 发布网站时文件丢失

      问题:使用VS发布网站时,发现一些Flv等文件丢失,没有发布到指定文件夹中. 解决办法:打开文件属性窗口,找到生成操作,选项选择“内容”即可. 详细内容可参考官方文档: http://msdn.m ...

  10. webssh software

    shellinabox是由Markus Gutschke开发的一款自由开源的基于Web的Ajax的终端模拟器.它使用AJAX技术,通过Web浏览器提供了类似原生的 Shell 的外观和感受. yum ...