Loaded plugins: product-id, search-disabled-repos, security, subscription-manage

yum安装报错:

[root@localhost yum.repos.d]# yum update

Loaded plugins: product-id, search-disabled-repos, security, subscription-manager

This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.


更换yum源,将原有源删除或备份到别的目下下:

#cd /etc/yum.repos.d/

#wget 

#vi Centos-7.repo

 编辑文件,把文件里面的$releasever全部替换为版本号:7最后保存!

#:%s/$releasever/7/g

#:wq


清除原有缓存,重建缓存:

#yum clean all 

#yum makecache


[root@localhost yum.repos.d]# yum clean all

Loaded plugins: product-id, search-disabled-repos, security, subscription-manager

This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.

Cleaning repos: base extras updates

Cleaning up Everything

[root@localhost yum.repos.d]# yum makecache

Loaded plugins: product-id, search-disabled-repos, security, subscription-manager

This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.

base                                                                                                                                                                                                                                                   | 3.6 kB     00:00     

base/group_gz                                                                                                                                                                                                                                          | 153 kB     00:00     

base/filelists_db                                                                                                                                                                                                                                      | 7.2 MB     00:00     

base/primary_db                                                                                                                                                                                                                                        | 6.1 MB     00:00     

base/other_db                                                                                                                                                                                                                                          | 2.6 MB     00:00     

extras                                                                                                                                                                                                                                                 | 2.9 kB     00:00     

extras/filelists_db                                                                                                                                                                                                                                    | 276 kB     00:00     

extras/primary_db                                                                                                                                                                                                                                      | 249 kB     00:00     

extras/other_db                                                                                                                                                                                                                                        | 149 kB     00:00     

updates                                                                                                                                                                                                                                                | 2.9 kB     00:00     

updates/filelists_db                                                                                                                                                                                                                                   | 9.6 MB     00:00     

updates/primary_db                                                                                                                                                                                                                                     |  17 MB     00:00     

updates/other_db                                                                                                                                                                                                                                       | 1.2 MB     00:00     

Metadata Cache Created


[root@localhost yum.repos.d]# yum -y install lrzsz

yum安装成功。



请使用浏览器的分享功能分享到微信等