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

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

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


当前回答

对我来说,我必须确保我使用了正确版本的密码学。 pip.freeze有一个较旧的版本,一旦我使用了最新的问题,就会消失。

其他回答

尽管这是一个老问题,我还是要补充一下我的观点。

我认为正确的答案取决于gcc编译器的错误消息,比如“Missing xxxx.h”

这在某些情况下可能会有所帮助:

sudo apt-get install build-essential python-dev

对我来说,以上这些都没用。但是,我解决了安装libssl-dev的问题。

sudo apt-get install libssl-dev

这可能会工作,如果你有相同的错误信息在我的情况下:

致命错误:openssl/openssl .h:没有这样的文件或目录... .... 命令“x86_64-linux-gnu-gcc”退出状态为1失败

尝试安装这些包。

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

h只是一个头文件。gcc使用它来构建应用程序。您需要安装一个名为python-dev的包。这个包包括头文件、静态库和用于构建Python模块、扩展Python解释器或在应用程序中嵌入Python的开发工具。

输入:

$ sudo apt-get install python-dev

or

# apt-get install python-dev

参见http://www.cyberciti.biz/faq/debian-ubuntu-linux-python-h-file-not-found-error-solution/

我的堆栈是这样的:

> >                            ^
> >     In file included from /usr/include/openssl/ssl.h:156:0,
> >                      from OpenSSL/crypto/x509.h:17,
> >                      from OpenSSL/crypto/crypto.h:17,
> >                      from OpenSSL/crypto/crl.c:3:
> >     /usr/include/openssl/x509.h:751:15: note: previous declaration of ‘X509_REVOKED_dup’ was here
> >      X509_REVOKED *X509_REVOKED_dup(X509_REVOKED *rev);
> >                    ^
> >     error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
> >     
> >     ----------------------------------------   Rolling back uninstall of > pyOpenSSL Command "/home/marta/env/pb/bin/python -u -c
> "import setuptools,
> > tokenize;__file__='/tmp/pip-build-14ekWY/pyOpenSSL/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n',
> > '\n');f.close();exec(compile(code, __file__, 'exec'))" install
> > --record /tmp/pip-2HERvW-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/marta/env/pb/include/site/python2.7/pyOpenSSL" failed with error
> > code 1 in /tmp/pip-build-14ekWY/pyOpenSSL/

在同样的情况下,请考虑其中一个安装文件中的错字(错误),并手动编辑它,将“X509_REVOKED_dup”更改为“X509_REVOKED_dupe”(没有引号)。我已经编辑了x509.h文件:

sed -e的 usr / include / openssl - x509。h

这对我来说很有效,但请参考下面链接的帖子,因为他们编辑了另一个文件:

sed -e's/X509_REVOKED_dup/X509_REVOKED_dupe/g' -i OpenSSL/crypto/crl.c . sed -e's/X509_REVOKED_dup/X509_REVOKED_dupe/g

https://groups.google.com/forum/ !主题/ kivy-users / Qt0jNIOACZc