解决:-bash: wget: 未找到命令,yum -y install wget却又报没有可用软件包

在终端执行yum -y install wget时,终端提示:

[root@master1-2 redis]# yum install wget -y
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
http://vault.centos.org/centos/7/extras/x86_64/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
正在尝试其它镜像。
To address this issue please refer to the below wiki article 

https://wiki.centos.org/yum-errors

If above article doesn't help to resolve this issue please use https://bugs.centos.org/.

没有可用软件包 wget。
错误:无须任何处理

然后到网上找说

yum -y install wget

就可以了,可是,还是不行

已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
没有可用软件包 wget。
错误:无须任何处理

我安装的是纯净版的centos7不知道哪里来的fastestmirror,这个插件什么东西都没有,
最后没有办法了,只能换一个yum,换一个国内的源,比较快就是我们常见的阿里的yum,

解决方法

在终端运行

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

然后再下载wget

yum -y install wget

原文链接:https://blog.csdn.net/weixin_39025362/article/details/105836169

posted @ 2022-12-09 00:46  蔡地像徐坤  阅读(559)  评论(0编辑  收藏  举报