centos8 Repository epel is listed more than once in the configuration


主要參考以下3個鏈接:

https://www.cnblogs.com/renpingsheng/p/7845096.html

https://blog.csdn.net/wy_bk/article/details/89648052

https://blog.csdn.net/taiyang1987912/article/details/41488395

問題出現:

想查看下系統是否安裝過docker

https://www.cnblogs.com/kingsonfu/p/11576797.html

運行yum list installed | grep docker命令,提示Repository epel is listed more than once in the configuration

解決辦法:

1、打包/etc/yum.repos.d/目錄下的所有文件,以備恢復使用,運行命令:zip centos8-repo.zip /etc/yum.repos.d/*

2、打包完畢,再運行ls命令查看多了一個zip文件,正是我們打包的文件

3、刪除多余文件,運行rm -rf !(centos8-repo.zip)命令,意思是刪除除.zip文件以外的所有文件,再次ls查看已經都刪除了

4、到阿里開源鏡像站點下載系統對應版本的repo文件,運行wget http://mirrors.aliyun.com/repo/Centos-7.repo命令

下載完后再次查看已經多出來一個centos-8.repo文件,再次運行yum list installed | grep docker命令,不再有任何提示。說明沒有安裝過docker!


免責聲明!

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



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