转载自: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. IOS Suppot Font 苹果默认支持的字体一览2(普通,加粗,倾斜)

  2. int 与 Integer--话说数组转集合

    话说是自从JDK5后,而这就可以自动进行类型转换了. 当然,区别还是有的,就是对象和“非对象”什么的.可是,今天进行一个测试,出了一个小问题,现将代码贴下: 代码0:先来一个正常点的,用String进 ...

  3. MES: ESB

    ESB定义了消息的收发和收发池,对于各种通讯方式定义了收发API,在收到信息后由eventBus来发布消息 ISender: public abstract interface ISender { p ...

  4. cookie和session区别

    cookie和session区 session是在服务器端保存用户信息,cookie是在客户端保存用户信息 session保存的是对象,cookie保存的是字符串 session会随回话结束而关闭,c ...

  5. spring day02-go3

    1.复制xml到container/basic包下2.ExampleBean中设置属性,包括基本类型(String和age)和集合类型(List,Set,Map),Properties类型3.添加无参 ...

  6. bean在容器上的生命周期

            初始化两种方法:         1,使用init-method属性指定那个方法在bean依赖关系设置好后自动执行.         2,实现initializingBean接口 实现 ...

  7. windows系统调用 线程创建

    #include "windows.h" #include "iostream" using namespace std; class CWorkerThrea ...

  8. java异常类

    package shb.java.exception; /** * 测试异常类 * @Package:shb.java.exception * @Description: * @author shao ...

  9. c#读取INI文件类

    using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.IO;na ...

  10. 夺命雷公狗---node.js---2node.js中的npm的常用命令

    npm install <name> 安装nodejs的依赖包 例如npm install express 就会默认安装express的最新版本,也可以通过在后面加版本号的方式安装指定版本 ...