yum報錯"This system is not registered with RHN"

錯誤信息:

root@localhost ipvsadm-1.25]# yum install gcc
Loading "security" plugin
Loading "rhnplugin" plugin
This system is not registered with RHN.
RHN support will be disabled.
Setting up Install Process
Parsing package install arguments
No package gcc available.
Nothing to do
[root@localhost ipvsadm-1.25]#

紅帽中出現"This system is not registered with RHN"這個的原因是因爲紅帽中沒有註冊RHN。


解決辦法:(假定你已安裝yum,且網絡暢通)更改yum的源,
即更換/etc/yum.repos.d/rhel-debuginfo.repo 這個文件。首先備份,如下所示:

[root@localhost yum.repos.d]# ls /etc/yum.repos.d/rhel-debuginfo.repo.bak


進入/etc/yum.repos.d/目錄,終端中輸入


wget http://docs.linuxtone.org/soft/lemp/CentOS-Base.repo


再看目下有什麼文件:

[root@localhost yum.repos.d]# ls /etc/yum.repos.d/
CentOS-Base.repo  rhel-debuginfo.repo.bak

即可在此目錄下得到CentOS-Base.repo文件,這是centos的源文件,然後測試看看yum是否可以使用了,
如果還是不可以的話,只需將其重命名爲rhel-debuginfo.repo即可。


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章