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

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

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


当前回答

我的堆栈是这样的:

> >                            ^
> >     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

其他回答

使用Ubuntu 14.04 LTS和运行python 3.5的virtualenv,我必须做:

sudo apt-get install python3.5-dev

其他命令:

sudo apt-get install python-dev
sudo apt-get install python3-dev

没有帮助。我认为这是因为virtualenv需要依赖于系统范围的python-dev包,它必须匹配virtualenv的python版本。但是,使用上述命令安装python-dev for python 2。X和蟒蛇Ubuntu 14.04是3.4版,不是3.5版。

当我在Ubuntu 14.04上遇到同样的问题时,上面的答案都对我不起作用

然而,这解决了错误:

Sudo apt-get install python-numpy libicu-dev

对于Centos 7使用以下命令安装Python开发包

Python 2.7

Sudo yum安装python-dev

Python 3.4

Sudo yum安装python34-devel

如果您的问题仍然没有解决,然后尝试安装以下包-

Sudo yum安装libffe -devel 安装openssl-devel

我在大学最后一年的主要项目中安装Linux Mint时遇到了同样的问题,下面的第三个解决方案对我有用。

当遇到这个错误时,请在错误之前注意,它可能会说你缺少一个包或头文件-你应该找到它们并安装它们,并验证它是否工作(例如ssl→libssl)。

对于Python 2。x使用:

sudo apt-get install python-dev

对于Python 2.7,请使用:

sudo apt-get install libffi-dev

对于Python 3。x使用:

sudo apt-get install python3-dev

或对于特定版本的Python 3,将x替换为中的次要版本

sudo apt-get install python3.x-dev

在ubuntu 14.04中:

sudo apt-file search ffi.h 

返回:

chipmunk-dev: /usr/include/chipmunk/chipmunk_ffi.h
ghc-doc: /usr/share/doc/ghc-doc/html/users_guide/ffi.html
jython-doc: /usr/share/doc/jython-doc/html/javadoc/org/python/modules/jffi/jffi.html
libffi-dev: /usr/include/x86_64-linux-gnu/ffi.h
libffi-dev: /usr/share/doc/libffi6/html/Using-libffi.html
libgirepository1.0-dev: /usr/include/gobject-introspection-1.0/girffi.h
libgirepository1.0-doc: /usr/share/gtk-doc/html/gi/gi-girffi.html
mlton-basis: /usr/lib/mlton/include/basis-ffi.h
pypy-doc: /usr/share/doc/pypy-doc/html/config/objspace.usemodules._ffi.html
pypy-doc: /usr/share/doc/pypy-doc/html/config/objspace.usemodules._rawffi.html
pypy-doc: /usr/share/doc/pypy-doc/html/rffi.html

我选择安装libffi-dev

sudo apt-get install libffi-dev

完美的工作