setup script exited with error: command ‘x86_64-linux-gnu-gcc’ failed with exit status 1

Python Programming

Question or problem about Python programming:

When I try to install odoo-server, I got the following error:

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

Could anyone help me to solve this issue?

How to solve the problem:

Solution 1:

I encountered the same problem in college having installed Linux Mint for the main project of my final year, the third solution below worked for me.

When encountering this error please note before the error it may say you are missing a package or header file — you should find those and install them and verify if it works (e.g. ssl → libssl).

For Python 2.x use:

$ sudo apt-get install python-dev

For Python 2.7 use:

$ sudo apt-get install libffi-dev

For Python 3.x use:

$ sudo apt-get install python3-dev

or for a specific version of Python 3, replace x with the minor version in

$ sudo apt-get install python3.x-dev

Solution 2:

Python.h is nothing but a header file. It is used by gcc to build applications. You need to install a package called python-dev. This package includes header files, a static library and development tools for building Python modules, extending the Python interpreter or embedding Python in applications.


$ sudo apt-get install python-dev 


# apt-get install python-dev 


Solution 3:

Try installing these packages.

sudo apt-get install build-essential autoconf libtool pkg-config python-opengl python-pil 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 libssl-dev sudo easy_install greenlet sudo easy_install gevent 

Solution 4:

You need to install these packages:

sudo apt-get install libpq-dev python-dev libxml2-dev libxslt1-dev libldap2-dev libsasl2-dev libffi-dev 

Solution 5:

$ sudo apt-get install gcc $ sudo apt-get install python-dateutil python-docutils python-feedparser python-gdata python-jinja2 python-ldap python-libxslt1 python-lxml python-mako python-mock python-openid python-psycopg2 python-psutil python-pybabel python-pychart python-pydot python-pyparsing python-reportlab python-simplejson python-tz python-unittest2 python-vatnumber python-vobject python-webdav python-werkzeug python-xlwt python-yaml python-zsi 


$ sudo apt-get install libxml2-dev libxslt1-dev 

Hope this helps!