失败:来自mongodb-org-3.2的repodata / repomd.xml:[Errno 256]没有更多镜像可以尝试

时间:2018-06-12 09:38:27

标签: mongodb amazon-web-services installation version redhat

我正在使用rhel fedora服务器,我需要将mongodb版本从v3.0.11升级到v3.2.20。

我正在按照链接中提供的步骤进行操作:https://docs.mongodb.com/v3.2/tutorial/install-mongodb-on-red-hat/

步骤1:创建/etc/yum.repos.d/mongodb-org-3.2.repo文件,以便您可以使用yum直接安装MongoDB。

sudo nano /etc/yum.repos.d/mongodb-org-3.2.repo

第2步:在新创建的文件中复制并通过以下代码。

[mongodb-org-3.2]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.2/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-3.2.asc

步骤3:要安装MongoDB的特定版本,请单独指定每个组件包,并将版本号附加到包名称,如下例所示:

sudo yum install -y mongodb-org-3.2.20 mongodb-org-server-3.2.20 mongodb-org-shell-3.2.20 mongodb-org-mongos-3.2.20 mongodb-org-tools-3.2.20

毕竟,我得到的错误如下:

Loaded plugins: priorities, update-motd, upgrade-helper
Repository mongodb-org-3.2 is listed more than once in the configuration
amzn-main/latest                                                                                                        | 2.1 kB     00:00     
amzn-updates/latest                                                                                                     | 2.5 kB     00:00     
https://repo.mongodb.org/yum/redhat/latest/mongodb-org/3.2/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.


 One of the configured repositories failed (MongoDB Repository),
 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. Disable the repository, 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 mongodb-org-3.2

     4. 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=mongodb-org-3.2.skip_if_unavailable=true

failure: repodata/repomd.xml from mongodb-org-3.2: [Errno 256] No more mirrors to try.

服务器操作系统

NAME="XXXXXXXXX"
VERSION="2016.03"
ID="XXXX"
ID_LIKE="rhel fedora"
VERSION_ID="2016.03"
PRETTY_NAME="XXXXXXXXX 2016.03"
ANSI_COLOR="0;33"
CPE_NAME="XXXXXXXXXXXXXXX"
HOME_URL="XXXXXXXXXXXXXXXXXX"

我已经按照以下步骤操作了,但这些不适用于我的情况:

sudo rm -rf /etc/yum.repos.d/mongod*

sudo yum clean all

再次创建了repo文件并重复步骤1到3。

0 个答案:

没有答案