Centos7- wget未找到命令,there are no enabled repos 解决办法

  1. 云栖社区>
  2. 博客>
  3. 正文

Centos7- wget未找到命令,there are no enabled repos 解决办法

论尽先生 2018-10-20 11:52:09 浏览2877 评论2

摘要: 解决:CentOS 7 wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo 或者 curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo 。



Connecting to 192.168.1.104:22...
Connection established.
To escape to local shell, press 'Ctrl+Alt+]'.

WARNING! The remote SSH server rejected X11 forwarding request.
Last login: Sat Oct 20 10:35:24 2018
[root@localhost ~]# mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
[root@localhost ~]# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
-bash: wget: 未找到命令
[root@localhost ~]# sudo wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
sudo: wget:找不到命令
[root@localhost ~]# yum -y install wget
已加载插件:fastestmirror
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>
[root@localhost ~]# mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
mv: 无法获取"/etc/yum.repos.d/CentOS-Base.repo" 的文件状态(stat): 没有那个文件或目录
[root@localhost ~]# ^C
[root@localhost ~]# ^C
[root@localhost ~]# mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
mv: 无法获取"/etc/yum.repos.d/CentOS-Base.repo" 的文件状态(stat): 没有那个文件或目录
[root@localhost ~]# sudo wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
sudo: wget:找不到命令
[root@localhost ~]# ^C
[root@localhost ~]# ^C
[root@localhost ~]# wget option url
-bash: wget: 未找到命令
[root@localhost ~]# wget option
-bash: wget: 未找到命令
[root@localhost ~]# sudo yum -y install wget
已加载插件:fastestmirror
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>
[root@localhost ~]# yum clean all
已加载插件:fastestmirror
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>
[root@localhost ~]# rpm -qa yum
yum-3.4.3-158.el7.centos.noarch






问题:反正就是没办法实现源配置的意思吧,我是新人,一头雾水,百度无结果 

解决:CentOS 7 wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo 或者 curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo 。

https://opsx.alibaba.com/mirror?lang=zh-CN  在阿里的镜像网站里面看漏了一行,这个版本是可以尝试 curl。



【云栖快讯】阿里巴巴小程序繁星计划,20亿补贴第一弹云应用免费申请,限量从速!  详情请点击

网友评论