How to fix error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

拈花ヽ惹草 提交于 2020-01-16 01:53:09

问题


I'm trying to install odoo on a fresh installation of Linux on a VirtualBox machine. I have entered in the commands found here as is: Odoo Development Read the Docs. The following command is what prompts the error: command 'x86_64-linux-gnu-gcc' failed with exit status 1:

sudo pip install -r requirements.txt

So now I'm trying to solve the problem. I have gone to error: Setup script exited with error: command 'x86_64-linux-gnu-gcc' failed with exit status 1,error: command 'gcc' failed with exit status 1 while installing eventlet , and entered in the following commands.

For the first link:

sudo apt-get install build-essential autoconf libtool pkg-config python-opengl python-imaging python-pyrex python-pyside.qtopengl idle-python2.7 qt4-dev-tools qt4-designer libqtgui4 libqtcore4 libqt4-xml libqt4-test libqt4-script libqt4-network libqt4-dbus python-qt4 python-qt4-gl libgle3 python-dev

sudo easy_install greenlet

sudo easy_install gevent

sudo pip install -r requirements.txt

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

The Second Link:

sudo apt-get install python-dev
sudo pip install -r requirements.txt

I still get the error. Then I tried:

sudo apt-get install libevent-dev
sudo pip install -r requirements.txt

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

What am I doing wrong?

Here is what happens after I enter the command:

$ sudo pip install -r requirements.txt
Requirement already satisfied (use --upgrade to upgrade): Babel==1.3 in /usr/lib/python2.7/dist-packages (from -r requirements.txt (line 1))
Requirement already satisfied (use --upgrade to upgrade): Jinja2==2.7.3 in /usr/local/lib/python2.7/dist-packages (from -r requirements.txt (line 2))
Requirement already satisfied (use --upgrade to upgrade): Mako==1.0.1 in /usr/local/lib/python2.7/dist-packages (from -r requirements.txt (line 3))
Requirement already satisfied (use --upgrade to upgrade): MarkupSafe==0.23 in /usr/lib/python2.7/dist-packages (from -r requirements.txt (line 4))
Requirement already satisfied (use --upgrade to upgrade): Pillow==2.7.0 in /usr/local/lib/python2.7/dist-packages (from -r requirements.txt (line 5))
Requirement already satisfied (use --upgrade to upgrade): Python-Chart==1.39 in /usr/local/lib/python2.7/dist-packages (from -r requirements.txt (line 6))
Requirement already satisfied (use --upgrade to upgrade): PyYAML==3.11 in /usr/lib/python2.7/dist-packages (from -r requirements.txt (line 7))
Requirement already satisfied (use --upgrade to upgrade): Werkzeug==0.9.6 in /usr/local/lib/python2.7/dist-packages (from -r requirements.txt (line 8))
Requirement already satisfied (use --upgrade to upgrade): argparse==1.2.1 in /usr/lib/python2.7 (from -r requirements.txt (line 9))
Requirement already satisfied (use --upgrade to upgrade): decorator==3.4.0 in /usr/local/lib/python2.7/dist-packages (from -r requirements.txt (line 10))
Requirement already satisfied (use --upgrade to upgrade): docutils==0.12 in /usr/lib/python2.7/dist-packages (from -r requirements.txt (line 11))
Requirement already satisfied (use --upgrade to upgrade): feedparser==5.1.3 in /usr/lib/python2.7/dist-packages (from -r requirements.txt (line 12))
Requirement already satisfied (use --upgrade to upgrade): gdata==2.0.18 in /usr/local/lib/python2.7/dist-packages (from -r requirements.txt (line 13))
Requirement already satisfied (use --upgrade to upgrade): gevent==1.0.2 in /usr/local/lib/python2.7/dist-packages (from -r requirements.txt (line 14))
Requirement already satisfied (use --upgrade to upgrade): greenlet==0.4.7 in /usr/local/lib/python2.7/dist-packages (from -r requirements.txt (line 15))
Requirement already satisfied (use --upgrade to upgrade): jcconv==0.2.3 in /usr/local/lib/python2.7/dist-packages (from -r requirements.txt (line 16))
Downloading/unpacking lxml==3.4.1 (from -r requirements.txt (line 17))
  Downloading lxml-3.4.1.tar.gz (3.5MB): 3.5MB downloaded
  Running setup.py (path:/tmp/pip-build-Hqt4sF/lxml/setup.py) egg_info for package lxml
    /usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'bugtrack_url'
      warnings.warn(msg)
    Building lxml version 3.4.1.
    Building without Cython.
    ERROR: /bin/sh: 1: xslt-config: not found

    ** make sure the development packages of libxml2 and libxslt are installed **

    Using build configuration of libxslt

    warning: no previously-included files found matching '*.py'
Downloading/unpacking mock==1.0.1 (from -r requirements.txt (line 18))
  Downloading mock-1.0.1.tar.gz (818kB): 818kB downloaded
  Running setup.py (path:/tmp/pip-build-Hqt4sF/mock/setup.py) egg_info for package mock

    warning: no files found matching '*.png' under directory 'docs'
    warning: no files found matching '*.css' under directory 'docs'
    warning: no files found matching '*.html' under directory 'docs'
    warning: no files found matching '*.js' under directory 'docs'
Downloading/unpacking ofxparse==0.14 (from -r requirements.txt (line 19))
  Downloading ofxparse-0.14.tar.gz (42kB): 42kB downloaded
  Running setup.py (path:/tmp/pip-build-Hqt4sF/ofxparse/setup.py) egg_info for package ofxparse

Downloading/unpacking passlib==1.6.2 (from -r requirements.txt (line 20))
  Downloading passlib-1.6.2.tar.gz (408kB): 408kB downloaded
  Running setup.py (path:/tmp/pip-build-Hqt4sF/passlib/setup.py) egg_info for package passlib

Downloading/unpacking psutil==2.2.0 (from -r requirements.txt (line 21))
  Downloading psutil-2.2.0.tar.gz (223kB): 223kB downloaded
  Running setup.py (path:/tmp/pip-build-Hqt4sF/psutil/setup.py) egg_info for package psutil

    warning: no previously-included files matching '*' found under directory 'docs/_build'
Downloading/unpacking psycogreen==1.0 (from -r requirements.txt (line 22))
  Downloading psycogreen-1.0.tar.gz
  Running setup.py (path:/tmp/pip-build-Hqt4sF/psycogreen/setup.py) egg_info for package psycogreen

Downloading/unpacking psycopg2==2.5.4 (from -r requirements.txt (line 23))
  Downloading psycopg2-2.5.4.tar.gz (682kB): 682kB downloaded
  Running setup.py (path:/tmp/pip-build-Hqt4sF/psycopg2/setup.py) egg_info for package psycopg2

Requirement already satisfied (use --upgrade to upgrade): pyPdf==1.13 in /usr/lib/python2.7/dist-packages (from -r requirements.txt (line 24))
Downloading/unpacking pydot==1.0.2 (from -r requirements.txt (line 25))
  Downloading pydot-1.0.2.tar.gz
  Running setup.py (path:/tmp/pip-build-Hqt4sF/pydot/setup.py) egg_info for package pydot
    Couldn't import dot_parser, loading of dot files will not be possible.

Requirement already satisfied (use --upgrade to upgrade): pyparsing==2.0.3 in /usr/lib/python2.7/dist-packages (from -r requirements.txt (line 26))
Requirement already satisfied (use --upgrade to upgrade): pyserial==2.7 in /usr/lib/python2.7/dist-packages (from -r requirements.txt (line 27))
Downloading/unpacking python-dateutil==2.4.0 (from -r requirements.txt (line 28))
  Downloading python_dateutil-2.4.0-py2.py3-none-any.whl (175kB): 175kB downloaded
Downloading/unpacking python-ldap==2.4.19 (from -r requirements.txt (line 29))
  Downloading python-ldap-2.4.19.tar.gz (138kB): 138kB downloaded
  Running setup.py (path:/tmp/pip-build-Hqt4sF/python-ldap/setup.py) egg_info for package python-ldap
    defines: HAVE_SASL HAVE_TLS HAVE_LIBLDAP_R
    extra_compile_args:
    extra_objects:
    include_dirs: /opt/openldap-RE24/include /usr/include/sasl /usr/include
    library_dirs: /opt/openldap-RE24/lib /usr/lib
    libs: ldap_r

    file Lib/ldap.py (for module ldap) not found
    file Lib/ldap/controls.py (for module ldap.controls) not found
    file Lib/ldap/extop.py (for module ldap.extop) not found
    file Lib/ldap/schema.py (for module ldap.schema) not found
    warning: no files found matching 'Makefile'
    warning: no files found matching 'Modules/LICENSE'
Requirement already satisfied (use --upgrade to upgrade): python-openid==2.2.5 in /usr/lib/python2.7/dist-packages (from -r requirements.txt (line 30))
Requirement already satisfied (use --upgrade to upgrade): pytz==2014.10 in /usr/lib/python2.7/dist-packages (from -r requirements.txt (line 31))
Downloading/unpacking pyusb==1.0.0b2 (from -r requirements.txt (line 32))
  Downloading pyusb-1.0.0b2.tar.gz (57kB): 57kB downloaded
  Running setup.py (path:/tmp/pip-build-Hqt4sF/pyusb/setup.py) egg_info for package pyusb

    warning: no files found matching 'ChangeLog'
Downloading/unpacking qrcode==5.1 (from -r requirements.txt (line 33))
  Downloading qrcode-5.1.tar.gz
  Running setup.py (path:/tmp/pip-build-Hqt4sF/qrcode/setup.py) egg_info for package qrcode

Downloading/unpacking reportlab==3.1.44 (from -r requirements.txt (line 34))
  Downloading reportlab-3.1.44.tar.gz (1.9MB): 1.9MB downloaded
  Running setup.py (path:/tmp/pip-build-Hqt4sF/reportlab/setup.py) egg_info for package reportlab
    ################################################
    #Attempting install of _rl_accel & pyHnj
    #extensions from '/tmp/pip-build-Hqt4sF/reportlab/src/rl_addons/rl_accel'
    ################################################
    ################################################
    #Attempting install of _renderPM
    #extensions from '/tmp/pip-build-Hqt4sF/reportlab/src/rl_addons/renderPM'
    will use package libart 2.3.12
    # installing without freetype no ttf, sorry!
    # You need to install a static library version of the freetype2 software
    # If you need truetype support in renderPM
    # You may need to edit setup.cfg (win32)
    # or edit this file to access the library if it is installed
    ################################################
    Downloading standard T1 font curves
    Finished download of standard T1 font curves

    ()
    ########## SUMMARY INFO #########
    ################################################
    #Attempting install of _rl_accel & pyHnj
    #extensions from '/tmp/pip-build-Hqt4sF/reportlab/src/rl_addons/rl_accel'
    ################################################
    ################################################
    #Attempting install of _renderPM
    #extensions from '/tmp/pip-build-Hqt4sF/reportlab/src/rl_addons/renderPM'
    will use package libart 2.3.12
    # installing without freetype no ttf, sorry!
    # You need to install a static library version of the freetype2 software
    # If you need truetype support in renderPM
    # You may need to edit setup.cfg (win32)
    # or edit this file to access the library if it is installed
    ################################################
    Downloading standard T1 font curves
    Finished download of standard T1 font curves
Downloading/unpacking requests==2.6.0 (from -r requirements.txt (line 35))
  Downloading requests-2.6.0-py2.py3-none-any.whl (469kB): 469kB downloaded
Requirement already satisfied (use --upgrade to upgrade): six==1.9.0 in /usr/lib/python2.7/dist-packages (from -r requirements.txt (line 36))
Downloading/unpacking suds-jurko==0.6 (from -r requirements.txt (line 37))
  Downloading suds-jurko-0.6.tar.bz2 (143kB): 143kB downloaded
  Running setup.py (path:/tmp/pip-build-Hqt4sF/suds-jurko/setup.py) egg_info for package suds-jurko

Requirement already satisfied (use --upgrade to upgrade): vatnumber==1.2 in /usr/lib/python2.7/dist-packages (from -r requirements.txt (line 38))
Downloading/unpacking vobject==0.6.6 (from -r requirements.txt (line 39))
  Downloading vobject-0.6.6.tar.gz (53kB): 53kB downloaded
  Running setup.py (path:/tmp/pip-build-Hqt4sF/vobject/setup.py) egg_info for package vobject

Requirement already satisfied (use --upgrade to upgrade): wsgiref==0.1.2 in /usr/lib/python2.7 (from -r requirements.txt (line 40))
Requirement already satisfied (use --upgrade to upgrade): xlwt==0.7.5 in /usr/lib/python2.7/dist-packages (from -r requirements.txt (line 41))
Requirement already satisfied (use --upgrade to upgrade): beautifulsoup4 in /usr/lib/python2.7/dist-packages (from ofxparse==0.14->-r requirements.txt (line 19))
Requirement already satisfied (use --upgrade to upgrade): setuptools in /usr/lib/python2.7/dist-packages (from pydot==1.0.2->-r requirements.txt (line 25))
Requirement already satisfied (use --upgrade to upgrade): pip>=1.4.1 in /usr/lib/python2.7/dist-packages (from reportlab==3.1.44->-r requirements.txt (line 34))
Requirement already satisfied (use --upgrade to upgrade): python-stdnum in /usr/lib/python2.7/dist-packages (from vatnumber==1.2->-r requirements.txt (line 38))
Installing collected packages: lxml, mock, ofxparse, passlib, psutil, psycogreen, psycopg2, pydot, python-dateutil, python-ldap, pyusb, qrcode, reportlab, requests, suds-jurko, vobject
  Found existing installation: lxml 3.4.4
    Not uninstalling lxml at /usr/lib/python2.7/dist-packages, owned by OS
  Running setup.py install for lxml
    /usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'bugtrack_url'
      warnings.warn(msg)
    Building lxml version 3.4.1.
    Building without Cython.
    ERROR: /bin/sh: 1: xslt-config: not found

    ** make sure the development packages of libxml2 and libxslt are installed **

    Using build configuration of libxslt
    building 'lxml.etree' extension
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/tmp/pip-build-Hqt4sF/lxml/src/lxml/includes -I/usr/include/python2.7 -c src/lxml/lxml.etree.c -o build/temp.linux-x86_64-2.7/src/lxml/lxml.etree.o -w
    In file included from src/lxml/lxml.etree.c:239:0:
    /tmp/pip-build-Hqt4sF/lxml/src/lxml/includes/etree_defs.h:14:31: fatal error: libxml/xmlversion.h: No such file or directory
    compilation terminated.
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
    Complete output from command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-Hqt4sF/lxml/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-tUvZhB-record/install-record.txt --single-version-externally-managed --compile:
    /usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'bugtrack_url'

  warnings.warn(msg)

Building lxml version 3.4.1.

Building without Cython.

ERROR: /bin/sh: 1: xslt-config: not found



** make sure the development packages of libxml2 and libxslt are installed **



Using build configuration of libxslt

running install

running build

running build_py

creating build

creating build/lib.linux-x86_64-2.7

creating build/lib.linux-x86_64-2.7/lxml

copying src/lxml/doctestcompare.py -> build/lib.linux-x86_64-2.7/lxml

copying src/lxml/builder.py -> build/lib.linux-x86_64-2.7/lxml

copying src/lxml/usedoctest.py -> build/lib.linux-x86_64-2.7/lxml

copying src/lxml/pyclasslookup.py -> build/lib.linux-x86_64-2.7/lxml

copying src/lxml/sax.py -> build/lib.linux-x86_64-2.7/lxml

copying src/lxml/_elementpath.py -> build/lib.linux-x86_64-2.7/lxml

copying src/lxml/ElementInclude.py -> build/lib.linux-x86_64-2.7/lxml

copying src/lxml/__init__.py -> build/lib.linux-x86_64-2.7/lxml

copying src/lxml/cssselect.py -> build/lib.linux-x86_64-2.7/lxml

creating build/lib.linux-x86_64-2.7/lxml/includes

copying src/lxml/includes/__init__.py -> build/lib.linux-x86_64-2.7/lxml/includes

creating build/lib.linux-x86_64-2.7/lxml/html

copying src/lxml/html/html5parser.py -> build/lib.linux-x86_64-2.7/lxml/html

copying src/lxml/html/diff.py -> build/lib.linux-x86_64-2.7/lxml/html

copying src/lxml/html/builder.py -> build/lib.linux-x86_64-2.7/lxml/html

copying src/lxml/html/usedoctest.py -> build/lib.linux-x86_64-2.7/lxml/html

copying src/lxml/html/_html5builder.py -> build/lib.linux-x86_64-2.7/lxml/html

copying src/lxml/html/_setmixin.py -> build/lib.linux-x86_64-2.7/lxml/html

copying src/lxml/html/ElementSoup.py -> build/lib.linux-x86_64-2.7/lxml/html

copying src/lxml/html/defs.py -> build/lib.linux-x86_64-2.7/lxml/html

copying src/lxml/html/_diffcommand.py -> build/lib.linux-x86_64-2.7/lxml/html

copying src/lxml/html/clean.py -> build/lib.linux-x86_64-2.7/lxml/html

copying src/lxml/html/formfill.py -> build/lib.linux-x86_64-2.7/lxml/html

copying src/lxml/html/__init__.py -> build/lib.linux-x86_64-2.7/lxml/html

copying src/lxml/html/soupparser.py -> build/lib.linux-x86_64-2.7/lxml/html

creating build/lib.linux-x86_64-2.7/lxml/isoschematron

copying src/lxml/isoschematron/__init__.py -> build/lib.linux-x86_64-2.7/lxml/isoschematron

copying src/lxml/lxml.etree.h -> build/lib.linux-x86_64-2.7/lxml

copying src/lxml/lxml.etree_api.h -> build/lib.linux-x86_64-2.7/lxml

copying src/lxml/includes/tree.pxd -> build/lib.linux-x86_64-2.7/lxml/includes

copying src/lxml/includes/xpath.pxd -> build/lib.linux-x86_64-2.7/lxml/includes

copying src/lxml/includes/c14n.pxd -> build/lib.linux-x86_64-2.7/lxml/includes

copying src/lxml/includes/dtdvalid.pxd -> build/lib.linux-x86_64-2.7/lxml/includes

copying src/lxml/includes/xmlparser.pxd -> build/lib.linux-x86_64-2.7/lxml/includes

copying src/lxml/includes/relaxng.pxd -> build/lib.linux-x86_64-2.7/lxml/includes

copying src/lxml/includes/config.pxd -> build/lib.linux-x86_64-2.7/lxml/includes

copying src/lxml/includes/xinclude.pxd -> build/lib.linux-x86_64-2.7/lxml/includes

copying src/lxml/includes/uri.pxd -> build/lib.linux-x86_64-2.7/lxml/includes

copying src/lxml/includes/xmlerror.pxd -> build/lib.linux-x86_64-2.7/lxml/includes

copying src/lxml/includes/etreepublic.pxd -> build/lib.linux-x86_64-2.7/lxml/includes

copying src/lxml/includes/htmlparser.pxd -> build/lib.linux-x86_64-2.7/lxml/includes

copying src/lxml/includes/schematron.pxd -> build/lib.linux-x86_64-2.7/lxml/includes

copying src/lxml/includes/xmlschema.pxd -> build/lib.linux-x86_64-2.7/lxml/includes

copying src/lxml/includes/xslt.pxd -> build/lib.linux-x86_64-2.7/lxml/includes

copying src/lxml/includes/etree_defs.h -> build/lib.linux-x86_64-2.7/lxml/includes

copying src/lxml/includes/lxml-version.h -> build/lib.linux-x86_64-2.7/lxml/includes

creating build/lib.linux-x86_64-2.7/lxml/isoschematron/resources

creating build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/rng

copying src/lxml/isoschematron/resources/rng/iso-schematron.rng -> build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/rng

creating build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/xsl

copying src/lxml/isoschematron/resources/xsl/RNG2Schtrn.xsl -> build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/xsl

copying src/lxml/isoschematron/resources/xsl/XSD2Schtrn.xsl -> build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/xsl

creating build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1

copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_svrl_for_xslt1.xsl -> build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1

copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_skeleton_for_xslt1.xsl -> build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1

copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_abstract_expand.xsl -> build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1

copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_message.xsl -> build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1

copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_dsdl_include.xsl -> build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1

copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/readme.txt -> build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1

running build_ext

building 'lxml.etree' extension

creating build/temp.linux-x86_64-2.7

creating build/temp.linux-x86_64-2.7/src

creating build/temp.linux-x86_64-2.7/src/lxml

x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/tmp/pip-build-Hqt4sF/lxml/src/lxml/includes -I/usr/include/python2.7 -c src/lxml/lxml.etree.c -o build/temp.linux-x86_64-2.7/src/lxml/lxml.etree.o -w

In file included from src/lxml/lxml.etree.c:239:0:

/tmp/pip-build-Hqt4sF/lxml/src/lxml/includes/etree_defs.h:14:31: fatal error: libxml/xmlversion.h: No such file or directory

compilation terminated.

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

----------------------------------------
  Can't roll back lxml; was not uninstalled
Cleaning up...
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-Hqt4sF/lxml/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-tUvZhB-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip-build-Hqt4sF/lxml
Storing debug log for failure in /home/aaa/.pip/pip.log

回答1:


Try installing the build-essential package first.

apt-get install build-essential


来源:https://stackoverflow.com/questions/35048582/how-to-fix-error-command-x86-64-linux-gnu-gcc-failed-with-exit-status-1

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!