当前位置:   article > 正文

GFS:创建yum源时,使用yum clean all && yum makecache报错_maybe you want: rm -rf /var/cache/yum, to also fre

maybe you want: rm -rf /var/cache/yum, to also free up space taken by orphan

情况:将本地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
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44

解决办法:
1、先将gfsrepo.zip这个包解压
2、再配置yum源

[glusterfs]
name=glusterfs
baseurl=file:///opt/gfsrepo
gpgcheck=0
enabled=1
  • 1
  • 2
  • 3
  • 4
  • 5

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
元数据缓存已建立

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/羊村懒王/article/detail/176800
推荐阅读
相关标签
  

闽ICP备14008679号