centos7 用yum命令安装wget无法安装解决办法

[技术工具] centos7 用yum命令安装wget无法安装解决办法

执行yum -y install wget时,终端报错    

[root@localhost /]# yum install wgetLoaded plugins: fastestmirrorLoading mirror speeds from cached hostfileThere 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>
   

解决办法    

在终端运行以下内容后即可正常安装wget:

curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
   
[root@localhost /]# curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current                                 Dload  Upload   Total   Spent    Left  Speed100  2523  100  2523    0     0   169k      0 --:--:-- --:--:-- --:--:--  175k
   

原因    

默认源无法下载,从阿里云更新下载源

  • 作者:科文童鞋
  • 链接:https://www.jianshu.com/p/01a12e8e204c
  • 来源:简书
所有评论 0
您需要登录后才可以回帖 登录 | 立即注册