redhat 6 無法使用 yum
出現錯誤
Loaded plugins: product-id, refresh-packagekit, search-disabled-repos, security, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
redhat 跟 centos 是一樣的
解決方法是替換成 centos 的來源
下載來源檔
cd /etc/yum.repos.d/
wget http://mirrors.163.com/.help/CentOS6-Base-163.repo
vi CentOS6-Base-163.repo
把文件里面的$releasever全部替换為版本號:6
:%s/$releasever/6/g
清除暫存,且資料更新
yum clean all
yum makecache
yum update
就可以使用囉
出現 Resolving mirrors.163.com... failed: Temporary failure in name resolution.
vim /etc/resolv.conf
nameserver 8.8.8.8
沒有留言:
張貼留言