配置openstack yum源无法更新软件包内核问题

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
epel/x86_64/metalink | 4.7 kB 00:00:00

  • base: mirrors.aliyun.com
  • centos-qemu-ev: mirror.bit.edu.cn
  • epel: my.mirrors.thegigabit.com
  • extras: mirrors.aliyun.com
  • updates: mirrors.aliyun.com
    base | 3.6 kB 00:00:00
    http://mirror.centos.org/altarch/7/storage/x86_64/ceph-luminous/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
    Trying other mirror.
    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 (CentOS-7 - Ceph Luminous),
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=centos-ceph-luminous ...

 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 centos-ceph-luminous
    or
        subscription-manager repos --disable=centos-ceph-luminous

 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=centos-ceph-luminous.skip_if_unavailable=true

failure: repodata/repomd.xml from centos-ceph-luminous: [Errno 256] No more mirrors to try.
http://mirror.centos.org/altarch/7/storage/x86_64/ceph-luminous/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found

针对这个问题,进行处理

很多刚接触openstack的小伙伴都会遇到这个问题,我也不例外,我看了很多大佬都是简单粗暴直接更换yum源,但是我更换完yum源还是会出现很多后续的问题,可能是我的方法不对。废话就不多说了 直接进入正题

mv CentOS-Base.repo CentOS-Baes.repo.backup#备份
wget /etc/yum.repos.d/ http://mirrors.aliyun.com/repo/Centos-7.repo
wget /etc/yum.repo.d/ http://mirrors.aliyun.com/repo/epel-7.repo #阿里云yum源
yum install epel-release
yum install centos-release-openstack-queens -y #安装yum源
mv epel.repo epel.repo.backup

yum upgrade –y #主机上更新软件包和内核
运行完这句代码,就会出现下面的错误
在这里插入图片描述
这是因为我们yum源使用的是官方的,所以会出现这个错误
错误一
在这里插入图片描述
这个报错就是说我们的yum源配置ceph-luminous文件镜像源有问题
cd /etc/yum.repos.d/ #进入yum文件夹
ls #查看文件
vim CentOS-Ceph-Luminous.repo #编辑文件

把里面的baseurl那一行更换为
baseurl = http://mirrors.aliyun.com/centos/7/storage/x86_64/ceph-luminous/

aliyun官网点击这里这里面有centos 7所需要的。

更换后
在这里插入图片描述
错误二
在这里插入图片描述
和上面的步骤一样
openstack-queens这个文件报错
把里面的baseurl那一行更换为
baseurl =http://mirrors.aliyun.com/centos/7/cloud/x86_64/openstack-queens/
aliyun官网点击这里这里面有centos 7所需要的。
更改后
在这里插入图片描述
在这里插入图片描述
如果有其他的配置文件错误的小伙伴可以在阿里云官网找到自己需要的。

运行
yum clean all
yum upgrade –y #主机上更新软件包和内核

ok,问题以解决,希望可以帮到大家。

  • 5
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值