Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
epel/x86_64/metalink | 4.7 kB 00:00:00
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,问题以解决,希望可以帮到大家。