当我尝试安装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
有人能帮我解决这个问题吗?
当前回答
TL;DR:执行如下命令
sudo apt-get install python2-dev gcc
我在尝试pip安装python2.7的模块时遇到了这个问题。
很多答案提到,解决这个问题的方法是sudo apt-get install python-dev。然而,这对我不起作用,因为包裹没有找到。然而,这条评论顶部显示的命令存在,我最终能够pip安装模块。
其他回答
在安装了许多库之后,对我有用的那一个!大喝:
sudo apt-get install swig
安装python的M2Crypto库时出现错误。
:)
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
很多时候,我在安装M2Crypto和pygraphviz时得到了相同的错误,并安装了批准的答案中提到的所有东西。但下面这行解决了我所有的问题与其他包在批准的答案太。
sudo apt-get install libssl-dev swig
sudo apt-get install -y graphviz-dev
这个swig包作为M2Crypto和graphviz-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.
希望对大家有所帮助!
这招对我很管用:
安装zlib1g-dev
在Linux Mint中使用python3
$ sudo apt install build-essential python3-dev
应该足够了