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

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

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


当前回答

这对我来说已经足够了:

sudo apt-get install build-essential

其他回答

在我的案例中,是oursql导致了如下所示的相同(通用)错误。

In file included from oursqlx/oursql.c:236:0:
  oursqlx/compat.h:13:19: fatal error: mysql.h: No such file or directory
  compilation terminated.
  error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

  ----------------------------------------
  Failed building wheel for oursql
  Running setup.py clean for oursql

因此,我知道我需要libmysqlcppconn-dev包。

sudo apt-get install libmysqlcppconn-dev

一切都好!

尝试安装这些包。

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

您需要安装这些软件包:

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

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


easy_install docker-compose

就像罗宾·温斯洛在评论中说的:

我在这里找到了解决方案:stackoverflow.com/a/5178444/613540

在我的例子中,我的完整错误信息是:

/usr/bin/ld: cannot find -lz 
collect2: error: ld returned 1 exit status
error: Setup script exited with error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

我试图安装洪流:

sudo python3 setup.py install

与给定的stackoverflow链接,我解决这个问题:

sudo apt install zlib1g-dev

注意,以下软件包已经安装:

libxslt1-dev is already the newest version.
python3-dev is already the newest version.
libxml2-dev is already the newest version.

希望对大家有所帮助!