当我尝试安装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
有人能帮我解决这个问题吗?
当前回答
在我的情况下,听从命令是有魔力的
sudo apt-get install gcc python3-dev
如果上面的命令不起作用,请尝试以下两个命令
sudo apt-get install gcc python-dev
当您希望它在您的机器中为默认python版本安装时,就会出现这种情况。
Or
sudo apt-get install gcc python3.x-dev
python3的地方。X表示安装在您机器上的python的版本号。
其他回答
对于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
... 等等……
Error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
执行sudo apt-get install 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
一切都好!
这招对我很管用:
安装zlib1g-dev
在我的情况下,pip无法安装库,我尝试了上面给出的解决方案,但没有一个有效,但下面的方法对我有效:
sudo apt upgrade gcc