2017-03-27 142 views
6

我想在我的虛擬環境中安裝一些東西,它使用了anaconda python 3.6。我得到the gcc failed with exit status 1,暗示缺少正確的python3-devel軟件包,如error: command 'gcc' failed with exit status 1 while installing eventlet中所述。如何在紅帽子上安裝python3-devel 7

要修復錯誤,我嘗試在運行RHEL 7.3的服務器上安裝python3-devel軟件包。 我做了yum install python3-devel,但得到了'package not found'錯誤。然後我發現https://serverfault.com/questions/710354/repository-for-python3-devel-on-centos-7,它提示EPEL存儲庫中的python34-devel軟件包。我使用yum安裝了它,但是在嘗試在我的虛擬環境中安裝某些東西時,我仍然收到the gcc failed with exit status 1錯誤。

有人知道我該如何解決這個問題嗎?所有的幫助都會受到很大的關注。

+0

「gcc失敗,退出狀態1」是症狀,而不是原因。 –

+0

嘿,謝謝你的回覆。正如我在我的文章中所描述的,我認爲原因是缺少python3-devel軟件包。 –

+0

好的,但在問題中沒有任何迴應。 –

回答

16

在百勝搜索的包,請使用以下命令:

yum search python3 | grep devel 

它會列出所有可用的devel包。其結果將是有點像這個

python3-cairo-devel.x86_64 : Libraries and headers for python3-cairo 
python3-devel.x86_64 : Libraries and header files needed for Python 3 
        : development 
python34-devel.x86_64 : Libraries and header files needed for Python 3 
         : development 

然後你可以選擇你想從列表中安裝的軟件包,想如果你想安裝python3-devel的,請執行以下

yum install -y python3-devel.x86_64 
+0

'#yum search python3 // 加載插件:langpacks,product-id,search-disabled-repos,subscription-manager // 警告:未找到與:python3 找不到匹配項 - 找不到我的系統 – Levon