在使用yum安装软件的时候会出现:
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Setting up Install Process
Nothing to do
- 解决方法(环境需要连接外网)
在地址:http://mirrors.aliyun.com/repo/Centos-6.repo下载源文件,将员文件放到/etc/yum.repos.d/目录
输入命令
# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
下载文件CentOS-Base.repo,然后编辑CentOS-Base.repo,修改文件中的版本号。
打开文件:
# vim CentOS-Base.repo
把文件里面的$releasever全部替换为版本号:6最后保存
:%s/$releasever/6/g
保存文件即可
:wq
就可以正常使用yum了