当我尝试安装doo-server时,我得到了以下错误:

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

有人能帮我解决这个问题吗?


当前回答

python3:

sudo apt-get install python3-dev \
     build-essential libssl-dev libffi-dev \
     libxml2-dev libxslt1-dev zlib1g-dev \
     python3-pip

Python2:

sudo apt-get install python2-dev  \
     build-essential libssl-dev libffi-dev \
     libxml2-dev libxslt1-dev zlib1g-dev \
     python2-pip

其他回答

除了一些其他有用的答案,如果docker-compose把你带到这里——使用你的venv集,运行:


easy_install docker-compose

$ 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

今天用pip升级了我的电脑,并检查了这里的其他答案,我可以告诉你它可能是任何东西。您应该逐一检查错误,查找您需要的特定库。在我的例子中,这些是我必须安装的库:

$ sudo apt-get install libssl-dev
$ sudo apt-get install libffi-dev
$ sudo apt-get install libjpeg-dev
$ sudo apt-get install libvirt-dev
$ sudo apt-get install libsqlite3-dev
$ sudo apt-get install libcurl4-openssl-dev
$ sudo apt-get install libxml2-dev libxslt1-dev python-dev

HTH

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 apt-get install gcc python3-dev

如果上面的命令不起作用,请尝试以下两个命令

sudo apt-get install gcc python-dev

当您希望它在您的机器中为默认python版本安装时,就会出现这种情况。

Or

sudo apt-get install gcc python3.x-dev

python3的地方。X表示安装在您机器上的python的版本号。