当我尝试安装doo-server时,我得到了以下错误:
error: Setup script exited with error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
有人能帮我解决这个问题吗?
当我尝试安装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中:
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
完美的工作
尽管这是一个老问题,我还是要补充一下我的观点。
我认为正确的答案取决于gcc编译器的错误消息,比如“Missing xxxx.h”
这在某些情况下可能会有所帮助:
sudo apt-get install build-essential python-dev
在我的案例中,是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
一切都好!
就像罗宾·温斯洛在评论中说的:
我在这里找到了解决方案: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.
希望对大家有所帮助!
首先你需要找出实际的问题是什么。你看到的是C编译器失败了,但你还不知道为什么。向上滚动到得到原始错误的地方。在我的情况下,尝试使用pip3安装一些包,我发现:
Complete output from command /usr/bin/python3 -c "import setuptools, tokenize;__file__='/tmp/pip-build-4u59c_8b/cryptography/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-itjeh3va-record/install-record.txt --single-version-externally-managed --compile --user:
c/_cffi_backend.c:15:17: fatal error: ffi.h: No such file or directory
#include <ffi.h>
^
compilation terminated.
所以在我的情况下,我需要安装libffi-dev。