美文网首页
centos7 用yum命令安装wget无法安装

centos7 用yum命令安装wget无法安装

作者: 科文童鞋 | 来源:发表于2019-07-18 16:49 被阅读0次

问题

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

[root@localhost /]# 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>

解决办法

在终端运行以下内容后即可正常安装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  Speed
100  2523  100  2523    0     0   169k      0 --:--:-- --:--:-- --:--:--  175k

原因

缺少文件,从阿里云下载更新缺失的文件

相关文章

网友评论

      本文标题:centos7 用yum命令安装wget无法安装

      本文链接:https://www.haomeiwen.com/subject/lnallctx.html