安装配置了本地的nexus仓库后,本地配置的yum无法使用问题解决方法

问题描述: 本机服务器由于使用K8S的自动安装服务器后,本地自动配置了nexus仓库,导致yum命令无法使用。

报错记录内容:

1.执行如下命令报错:

yum repolist all
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
repolist: 0

或者报错:

Finished Dependency Resolution You could try using --skip-broken to work around the problem You 
could try running: rpm -Va --nofiles --nodigest

2.执行如下命令还报错;

yum install unzip
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>

what??
在这里插入图片描述

仔细检查配置文件发现,里面多了其他源文件及文件夹的配置,我们找到如下位置:

cat /etc/yum.conf

在这里插入图片描述

找到最后一行配置的内容,给与其注销掉!!!

然后执行清理缓存、更新缓存、等命令

yum clean all
yum repolist
yum makecache

执行完毕后,在查看yum命令是否可以执行,成功执行。

yum install uznip -y

安装成功,问题搞定!!!!

  • 2
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值