redhat7.5上安裝gcc編譯器
阿新 • • 發佈:2018-12-09
1、背景 在redhat7.5上安裝python3,執行命令./configure時,出現如下報錯:configure: error: no acceptable C compiler found in $PATH 這個報錯,說明沒有安裝合適的編譯器gcc,這時就需要安裝或者升級gcc及其它依賴包 2、使用yum命令直接聯網安裝gcc yum install gcc -y 執行命令後,報如下錯: This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register. 這是因為redhat7.5自帶的yum源需要註冊,但是並沒有購買redhat7.5的服務。網上發現說可以用centos的yum包替換。也就是說,需要重新安裝yum包 3、解除安裝redhat上預設安裝的yum
CentOS-Base.repo
#
The mirror system uses the connecting IP address of the client and the
update status of each mirror to pick mirrors that are updated to and
geographically close to the client. You should use this for CentOS updates
unless you are manually picking other mirrors.
#
If the mirrorlist= does not work for you, as a fall back you can try the
remarked out baseurl= line instead.
# # [base] name=CentOS-$7 - Base - 163.com
released updates
[updates] name=CentOS-$7 - Updates - 163.com
additional packages that may be useful
[extras] name=CentOS-$7 - Extras - 163.com