centos7安裝gcc,yum報錯Repository base is listed more than once in the configuration


yum 安裝gcc時報錯:

Loaded plugins: fastestmirror

Repository base is listed more than once in the configuration

查了各種資料,沒解決,最后發現了錯誤原因(只是其中一種原因);

 

 藍色框:這些錯誤嘗試各種解決仍無效。

紅色框:最后發現是yum 被占用了。論看全部信息的重要性

綠色框:果然yum被占用 kill 掉

配置阿里源 

 wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

安裝gcc

yum -y install gcc gcc-c++ kernel-devel

查看gcc

gcc -v

離線安裝未嘗試

鏡像庫下載下列包 http://mirrors.aliyun.com/centos/7/os/x86_64/Packages/

mpfr-3.1.1-4.el7.x86_64.rpm
libmpc-1.0.1-3.el7.x86_64.rpm
kernel-headers-3.10.0-123.el7.x86_64.rpm
glibc-headers-2.17-55.el7.x86_64.rpm
glibc-devel-2.17-55.el7.x86_64.rpm
cpp-4.8.2-16.el7.x86_64.rpm
gcc-4.8.2-16.el7.x86_64.rpm    

安裝

rpm -Uvh *.rpm --nodeps --force


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM