当我尝试安装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
有人能帮我解决这个问题吗?
当前回答
在我的案例中,是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 python3-lxml
TL;DR:执行如下命令
sudo apt-get install python2-dev gcc
我在尝试pip安装python2.7的模块时遇到了这个问题。
很多答案提到,解决这个问题的方法是sudo apt-get install python-dev。然而,这对我不起作用,因为包裹没有找到。然而,这条评论顶部显示的命令存在,我最终能够pip安装模块。
$ 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
对于Python 3.4使用:
sudo apt-get install python3.4-dev
对于Python 3.5,请使用:
sudo apt-get install python3.5-dev
对于Python 3.6使用:
sudo apt-get install python3.6-dev
对于Python 3.7,请使用:
sudo apt-get install python3.7-dev
对于Python 3.8使用:
sudo apt-get install python3.8-dev
... 等等……
对我来说,我必须确保我使用了正确版本的密码学。 pip.freeze有一个较旧的版本,一旦我使用了最新的问题,就会消失。