yum install 安装 报错

傷城~ 2022-12-09 05:18 376阅读 0赞

错误如下:

  1. [root@model-cluster-3 redis]# yum install tar
  2. Loaded plugins: fastestmirror
  3. Loading mirror speeds from cached hostfile
  4. Nothing to do

网络没问题:

  1. [root@model-cluster-3 redis]# ping www.baidu.com
  2. PING www.a.shifen.com (220.181.38.149) 56(84) bytes of data.
  3. 64 bytes from 220.181.38.149 (220.181.38.149): icmp_seq=1 ttl=52 time=18.5 ms
  4. 64 bytes from 220.181.38.149 (220.181.38.149): icmp_seq=2 ttl=52 time=19.9 ms

解决办法:

输入命令:curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

  1. [root@model-cluster-3 redis]# curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
  2. % Total % Received % Xferd Average Speed Time Time Time Current
  3. Dload Upload Total Spent Left Speed
  4. 100 2523 100 2523 0 0 28965 0 --:--:-- --:--:-- --:--:-- 29337

再次yum install,问题解决。

  1. [root@model-cluster-3 redis]# yum install wget

#

发表评论

表情:
评论列表 (有 0 条评论,376人围观)

还没有评论,来说两句吧...

相关阅读