当我尝试安装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 unixodbc-dev解决了这个问题。我得到了一个特定于sql.h头文件的错误。
其他回答
在我的情况下,pip无法安装库,我尝试了上面给出的解决方案,但没有一个有效,但下面的方法对我有效:
sudo apt upgrade gcc
在我的例子中,是缺少libffi-dev包。
工作:
sudo apt-get install libffi-dev
TL;DR:执行如下命令
sudo apt-get install python2-dev gcc
我在尝试pip安装python2.7的模块时遇到了这个问题。
很多答案提到,解决这个问题的方法是sudo apt-get install python-dev。然而,这对我不起作用,因为包裹没有找到。然而,这条评论顶部显示的命令存在,我最终能够pip安装模块。
在我的案例中,是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
一切都好!
除了一些其他有用的答案,如果docker-compose把你带到这里——使用你的venv集,运行:
easy_install docker-compose