vps交流

[已解决] (感谢各位大佬的帮助)yum 坏了 详细说明


本帖最后由 canxunhulian 于 2022-3-16 17:55 编辑

我刚刚应该是不小心执行了 yum-config-manager –add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-c

掉了字

应该是yum-config-manager –add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo

然后现在安装东西
比如 yum install screen

yum install screen
已加载插件:fastestmirror
Repository epel is listed more than once in the configuration
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
base                                                                                                     | 3.6 kB  00:00:00     
docker-ce-stable                                                                                         | 3.5 kB  00:00:00     
epel                                                                                                     | 4.7 kB  00:00:00     
extras                                                                                                   | 2.9 kB  00:00:00     
https://mirrors.aliyun.com/docker-ce/linux/centos/docker-c/repodata/repomd.xml: [Errno 14] HTTPS Error 404 – Not Found
正在尝试其它镜像。
To address this issue please refer to the below wiki article

https://wiki.centos.org/yum-errors

If above article doesn’t help to resolve this issue please use https://bugs.centos.org/.

One of the configured repositories failed (added from: https://mirrors.aliyun.com/docker-ce/linux/centos/docker-c),
and yum doesn’t have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work "fix" this:

     1. Contact the upstream for the repository and get them to fix the problem.

     2. Reconfigure the baseurl/etc. for the repository, to point to a working
        upstream. This is most often useful if you are using a newer
        distribution release than is supported by the repository (and the
        packages for the previous distribution release still work).

     3. Run the command with the repository temporarily disabled
            yum –disablerepo=mirrors.aliyun.com_docker-ce_linux_centos_docker-c …

     4. Disable the repository permanently, so yum won’t use it by default. Yum
        will then just ignore the repository until you permanently enable it
        again or use –enablerepo for temporary usage:

            yum-config-manager –disable mirrors.aliyun.com_docker-ce_linux_centos_docker-c
        or
            subscription-manager repos –disable=mirrors.aliyun.com_docker-ce_linux_centos_docker-c

     5. Configure the failing repository to be skipped, if it is unavailable.
        Note that yum will try to contact the repo. when it runs most commands,
        so will have to try and fail each time (and thus. yum will be be much
        slower). If it is a very temporary problem though, this is often a nice
        compromise:

            yum-config-manager –save –setopt=mirrors.aliyun.com_docker-ce_linux_centos_docker-c.skip_if_unavailable=true

failure: repodata/repomd.xml from mirrors.aliyun.com_docker-ce_linux_centos_docker-c: [Errno 256] No more mirrors to try.
https://mirrors.aliyun.com/docker-ce/linux/centos/docker-c/repodata/repomd.xml: [Errno 14] HTTPS Error 404 – Not Found

无不无聊 一个贴发两次

HOH 发表于 2022-3-16 17:32
无不无聊 一个贴发两次

我在找解决方法

就不要重复发了撒,既然都卸载了yum那就自己用rpm装回来
有addrepo就有deleterepo吧,删了重新加

Ticifer 发表于 2022-3-16 17:37
就不要重复发了撒,既然都卸载了yum那就自己用rpm装回来

我卸载装回来还是这样

本帖最后由 sagerking 于 2022-3-16 17:43 编辑

更换yum源解决一切问题,另外,阿里的默认源是走阿里内网域名,如果使用了warp之类的会导致无法解析

还是centos?是不是删源了?
vim /etc/yum.repo.d 删除了重新添加
有个连不上的repo = yum坏了,这么点东西都要折腾这么久,正常人的逻辑都是加错了东西删掉就好了