问题描述: 本机服务器由于使用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
安装成功,问题搞定!!!!