所有文件都已从/etc/yum.repos.d/目录中删除。如何重新安装全新安装的CentOS 7附带的默认repos文件?
当我执行下面的命令"yum repolist all“时,我得到了以下结果:
Loaded plugins: fastestmirror, landpacks
Loading mirror speeds from cached hostfile
repolist: 0谢谢。
发布于 2018-02-24 18:02:19
重新构建默认的CentOS yum.repo.d文件夹
在一台开发机器上,不知何故,我设法删除了我的yum.repo.d内容。我想要将repo文件重新构建为其默认设置。首先,你需要弄清楚你使用的是什么版本:
cat /etc/redhat-release然后访问正确的发行版:http://vault.centos.org/
navigate to the correct os/x86_64/CentOS/ directory (could be os/x86_64/CentOS/ i386/)
Download the following files to the server:
wget http://vault.centos.org/5.x/os/x86_64/CentOS/centos-release-notes-5.x-0.x86_64.rpm
wget http://vault.centos.org/5.x/os/x86_64/CentOS/centos-release-5-x.el5.centos.x86_64.rpm
Then install the two rpms:
rpm -Uivh *.rpm应返回到原始的发货回购文件。
来源: jbmurphy于2011年7月8日在Linux参考- http://www.jbmurphy.com/2011/07/08/rebuild-your-the-default-centos-yum-repo-d-folder/上发表
https://stackoverflow.com/questions/44857315
复制相似问题