yum源更新报错[Errno 256] failure: repodata/repomd.xml from...

在安装OpenStack平台时,配置软件仓库,并升级软件包时出现以下报错。

[root@test ~]# yum update -y
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
common                                                                                                                               | 2.9 kB  00:00:00     
extras                                                                                                                               | 2.9 kB  00:00:00     
ftp://192.168.217.139/ops10/repodata/repomd.xml: [Errno 14] FTP Error 550 - Server denied you to change to the given directory
Trying other mirror.


 One of the configured repositories failed (ops10),
 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=ops10 ...

     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 ops10
        or
            subscription-manager repos --disable=ops10

     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=ops10.skip_if_unavailable=true

failure: repodata/repomd.xml from ops10: [Errno 256] No more mirrors to try.
ftp://192.168.217.139/ops10/repodata/repomd.xml: [Errno 14] FTP Error 550 - Server denied you to change to the given directory

看了网上很多解决办法,yum clean all , yum makecache。尝试了一下发现对我这个问题并没有帮助,在makecache时也会出错。
最后找到了问题的原因,在我的一个软件仓库ops10仓库中,没有做好依赖关系的创建。
解决途径:
找到报错的那个软件仓库/var/ftp/ops10,使用命令createrepo -v /var/ftp/ops10,再次yum makecache,发现问题解决了。
createrepo 命令用于创建yum源(软件仓库),即为存放于本地特定位置的众多rpm包建立索引,描述各包所需依赖信息,并形成元数据。

你可能感兴趣的:(yum源更新报错[Errno 256] failure: repodata/repomd.xml from...)