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

简介: 解决: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。



相关文章
|
24天前
|
Linux 网络安全
Centos 防火墙端口控制命令
Centos 防火墙端口控制命令
29 3
|
6月前
|
Linux Windows
Centos和Windows进程相关命令
Centos 杀死同名的全部进程命令:ps -efww|grep 进程名 |grep -v grep|cut -c 9-15|xargs kill -9 Centos 查看同名的全部进程数命令:ps -ef | grep 进程名 | wc -l Windows杀死同名进程命令:taskkill /F /IM chrome.exe Windows查看同名进程命令:tasklist /fi "...
51 0
|
5月前
|
存储 关系型数据库 Linux
Linux之centos7安装配置及Linux常用命令
Linux之centos7安装配置及Linux常用命令
219 0
|
16天前
|
网络协议 应用服务中间件 Linux
centos7 Nginx Log日志统计分析 常用命令
centos7 Nginx Log日志统计分析 常用命令
30 2
|
1月前
|
监控 网络协议 Linux
Linux 命令大全 & CentOS常用运维命令
Linux 命令大全 & CentOS常用运维命令
157 0
|
1月前
|
关系型数据库 MySQL 数据库
虚拟机Linux-Centos系统网络配置常用命令+Docker 的常用命令
虚拟机Linux-Centos系统网络配置常用命令+Docker 的常用命令
45 0
|
5月前
|
安全 Unix Linux
Centos虚拟机安装配置与MobaXterm工具及Linux常用命令(下)
Centos虚拟机安装配置与MobaXterm工具及Linux常用命令(下)
138 0
|
5月前
|
Unix Linux 开发工具
【Linux】centos7安装配置及Linux常用命令
【Linux】centos7安装配置及Linux常用命令
171 1
|
5月前
|
关系型数据库 MySQL Linux
CentOS mysql常用命令
CentOS mysql常用命令
57 0
|
3月前
|
消息中间件 Java Kafka
Apache Kafka-初体验Kafka(02)-Centos7下搭建单节点kafka_配置参数详解_基本命令实操
Apache Kafka-初体验Kafka(02)-Centos7下搭建单节点kafka_配置参数详解_基本命令实操
60 0

热门文章

最新文章