2019-02-15
閱讀量:
2483
yum 安裝 wget 失敗
使用yum 安裝wget 失敗,安裝命令為:
yum install wget
報錯信息如下:
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
There are no enabled repos.
Run "yum repolist all" to see the repos you have.
To enable Red Hat Subscription Management repositories:
subscription-manager repos --enable <repo>
To enable custom repositories:
yum-config-manager --enable <repo>
答:出現(xiàn)該錯誤是因為系統(tǒng)DNS配置錯誤導致無法解析軟件服務器所致的。
解決思路有兩個:
一、修改DNS
編輯 /etc/resolv.conf
在文件中添加如下內(nèi)容
nameserver 114.114.114.114
二、使用rpm包安裝
先到http://mirror.centos.org/centos/7/os/x86_64/Packages/ 下載 wget-1.14-18.el7.x86_64.rpm
然后使用如下命令進行安裝
rpm -ivh wget-1.14-18.el7.x86_64.rpm






評論(0)


暫無數(shù)據(jù)
推薦帖子
0條評論
1條評論
0條評論