欢迎光临
我们一直在努力
卡尔云 大网数据--高防低价服务器抢购 低至28/月十堰4-4就在零零陆云计算 香港 日本 美国 韩国 9.9/月 819云计算香港20MCN2 300元/月
林枫云-专注独立IP高频VPS 香港 日本 美国 韩国 9.9/月 GoDo云计算韩国物理机低至299元/月 龍行数据:美国100M服务器 299元/月 络V云计算:新加坡100M服务器 1200元/月
CNMCDN防护稳定又实惠 轻松云:美国200兆VPS16元/月 亦宁云200M大带宽 动态BGP低至35/月 低价高效上云-道之云网络 【科御云】香港CDN、延迟低速度快防御高

CentOS7报错There are no enabled repos. Run "yum repolist all" to see the repos you have

在一台CentOS7的服务器上遇到标题标错:

[root@localhost ~]# yum install -y wgetLoaded plugins: fastestmirrorLoading mirror speeds from cached hostfileThere 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>

通过yum什么都不能安装,搜索了下解决方法,所以记录下来。

报错信息如图:

解决方法为:

下载对应版本repo文件, 放入/etc/yum.repos.d/里,下载地址:http://mirrors.163.com/.help/centos.html

***因为我这台机器wget也不能用,所以我是下载到本地sftp上去的***

完成后,查看/etc/yum.repos.d文件夹下是否有了CentOS-Base.repo文件,然后生成缓存。

yum clean all yum makecache

最后再次执行我们之前报错的命令,已经OK了。

赞(2)
未经允许不得转载:沃园 » CentOS7报错There are no enabled repos. Run "yum repolist all" to see the repos you have

评论 抢沙发

评论前必须登录!

立即登录   注册