赞
踩
情况:将本地Yum仓库备份后,创建gfs的yum源后,使用yum clean all && yum makecache后报错
报错代码如下:
[root@client yum.repos.d]# yum clean all 已加载插件:fastestmirror, langpacks 正在清理软件源: glusterfs Cleaning up everything Maybe you want: rm -rf /var/cache/yum, to also free up space taken by orphaned data from disabled or removed repos [root@client yum.repos.d]# yum makecache 已加载插件:fastestmirror, langpacks file:///opt/gfsrepo/repodata/repomd.xml: [Errno 14] curl#37 - "Couldn't open file /opt/gfsrepo/repodata/repomd.xml" 正在尝试其它镜像。 One of the configured repositories failed (glusterfs), 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=glusterfs ... 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 glusterfs or subscription-manager repos --disable=glusterfs 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=glusterfs.skip_if_unavailable=true failure: repodata/repomd.xml from glusterfs: [Errno 256] No more mirrors to try. file:///opt/gfsrepo/repodata/repomd.xml: [Errno 14] curl#37 - "Couldn't open file /opt/gfsrepo/repodata/repomd.xml"
解决办法:
1、先将gfsrepo.zip这个包解压
2、再配置yum源
[glusterfs]
name=glusterfs
baseurl=file:///opt/gfsrepo
gpgcheck=0
enabled=1
3、yum clean all && yum makecache
这样问题就解决了
这个是成功后的代码
[root@client opt]# yum clean all && yum makecache
已加载插件:fastestmirror, langpacks
正在清理软件源: glusterfs
Cleaning up everything
Maybe you want: rm -rf /var/cache/yum, to also free up space taken by orphaned data from disabled or removed repos
已加载插件:fastestmirror, langpacks
glusterfs | 2.9 kB 00:00:00
(1/3): glusterfs/filelists_db | 62 kB 00:00:00
(2/3): glusterfs/other_db | 46 kB 00:00:00
(3/3): glusterfs/primary_db | 92 kB 00:00:00
Determining fastest mirrors
元数据缓存已建立
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。