Centos7最小化安裝報錯There are no enabled repos. Run "yum repolist all" to see the repos you have.解決辦法


原因是缺少CentOS-Base.repo文件,因為我這台機器wget也不能用,所以我是下載到本地sftp上去的,傳輸的時候一定要在root用戶下,否則會無法啟動傳輸

這是報錯的完整信息:Loading mirror speeds from cached hostfile

There are no enabled repos.

 Run "yum repolist all" to see the repos you have.

 To enable Red Hat Subscription Management repositories:

     subscription-manager repos --enable <repo>

 To enable custom repositories:

     yum-config-manager --enable <repo>

 

 

 

1、yum –help 顯然yum是正常的,也許是網絡問題。

 

 

 

2、一定要將身份切換到root賬戶,進入vim /etc/sysconfig/network-scripts/ifcfg-ens33修改文件,將ONBOOT=no改為yes,如果沒有做網絡配置的,也要配置網絡;

 

 

 

 

3、解決方法為:

下載對應版本repo文件, 放入/etc/yum.repos.d/里,下載地址:http://mirrors.163.com/.help/centos.html

因為我這台機器wget也不能用,所以我是下載到本地sftp上去的,傳輸的時候一定要在root用戶下,否則會無法啟動傳輸(用一般的傳輸工具就可以了)

 

 

 

完成后,查看/etc/yum.repos.d文件夾下是否有了CentOS-Base.repo文件,然后生成緩存,分別執行下面兩個命令:

yum clean all

yum makecache

 

 

最后執行yum -y install wget至此就成功了;

 

 

 


免責聲明!

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



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