用 yum 安装 MongoDB 报 404

2016-06-29 13:25:31 +08:00
 Techxiu

centos7

按照 官方文档 创建了 /etc/yum.repos.d/mongodb-org-3.2.repo 填写配置

[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

然后

yum install -y mongodb-org
Loaded plugins: langpacks
Repository 'mongodb': Error parsing config: Error parsing "enabled = ''": invalid boolean value
https://repo.mongodb.org/yum/redhat/7/mongodb-org/3.2/x86_64/repodata/repomd.xml: [Errno 12] Timeout on https://repo.mongodb.org/yum/redhat/7/mongodb-org/3.2/x86_64/repodata/repomd.xml: (28, 'Resolving timed out after 3516 milliseconds')
Trying other mirror.
https://repo.mongodb.org/yum/redhat/7/mongodb-org/3.2/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: repo.mongodb.org; Name or service not known"
Trying other mirror.
Resolving Dependencies
--> Running transaction check
---> Package mongodb-org.x86_64 0:3.2.7-1.el7 will be installed
--> Processing Dependency: mongodb-org-tools = 3.2.7 for package: mongodb-org-3.2.7-1.el7.x86_64
--> Processing Dependency: mongodb-org-shell = 3.2.7 for package: mongodb-org-3.2.7-1.el7.x86_64
--> Processing Dependency: mongodb-org-server = 3.2.7 for package: mongodb-org-3.2.7-1.el7.x86_64
--> Processing Dependency: mongodb-org-mongos = 3.2.7 for package: mongodb-org-3.2.7-1.el7.x86_64
--> Running transaction check
---> Package mongodb-org-mongos.x86_64 0:3.2.7-1.el7 will be installed
---> Package mongodb-org-server.x86_64 0:3.2.7-1.el7 will be installed
---> Package mongodb-org-shell.x86_64 0:3.2.7-1.el7 will be installed
---> Package mongodb-org-tools.x86_64 0:3.2.7-1.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package                Arch       Version            Repository           Size
================================================================================
Installing:
 mongodb-org            x86_64     3.2.7-1.el7        mongodb-org-3.2     5.8 k
Installing for dependencies:
 mongodb-org-mongos     x86_64     3.2.7-1.el7        mongodb-org-3.2     5.6 M
 mongodb-org-server     x86_64     3.2.7-1.el7        mongodb-org-3.2      12 M
 mongodb-org-shell      x86_64     3.2.7-1.el7        mongodb-org-3.2     6.7 M
 mongodb-org-tools      x86_64     3.2.7-1.el7        mongodb-org-3.2      43 M

Transaction Summary
================================================================================
Install  1 Package (+4 Dependent packages)

Total download size: 68 M
Installed size: 221 M
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
mongodb-org-mongos-3.2.7-1.el7 FAILED
https://repo.mongodb.org/yum/redhat/7/mongodb-org/3.2/x86_64/RPMS/mongodb-org-mongos-3.2.7-1.el7.x86_64.rpm: [Errno 14] curl#6 - "Could not resolve host: repo.mongodb.org; Name or service not known"
Trying other mirror.
mongodb-org-3.2.7-1.el7.x86_64 FAILED
https://repo.mongodb.org/yum/redhat/7/mongodb-org/3.2/x86_64/RPMS/mongodb-org-3.2.7-1.el7.x86_64.rpm: [Errno 14] curl#6 - "Could not resolve host: repo.mongodb.org; Name or service not known"
Trying other mirror.
mongodb-org-server-3.2.7-1.el7 FAILED
https://repo.mongodb.org/yum/redhat/7/mongodb-org/3.2/x86_64/RPMS/mongodb-org-server-3.2.7-1.el7.x86_64.rpm: [Errno 14] curl#6 - "Could not resolve host: repo.mongodb.org; Name or service not known"
Trying other mirror.
mongodb-org-shell-3.2.7-1.el7. FAILED
https://repo.mongodb.org/yum/redhat/7/mongodb-org/3.2/x86_64/RPMS/mongodb-org-shell-3.2.7-1.el7.x86_64.rpm: [Errno 14] curl#6 - "Could not resolve host: repo.mongodb.org; Name or service not known"
Trying other mirror.
mongodb-org-tools-3.2.7-1.el7. FAILED
https://repo.mongodb.org/yum/redhat/7/mongodb-org/3.2/x86_64/RPMS/mongodb-org-tools-3.2.7-1.el7.x86_64.rpm: [Errno 14] curl#6 - "Could not resolve host: repo.mongodb.org; Name or service not known"
Trying other mirror.


Error downloading packages:
  mongodb-org-mongos-3.2.7-1.el7.x86_64: [Errno 256] No more mirrors to try.
  mongodb-org-shell-3.2.7-1.el7.x86_64: [Errno 256] No more mirrors to try.
  mongodb-org-tools-3.2.7-1.el7.x86_64: [Errno 256] No more mirrors to try.
  mongodb-org-server-3.2.7-1.el7.x86_64: [Errno 256] No more mirrors to try.
  mongodb-org-3.2.7-1.el7.x86_64: [Errno 256] No more mirrors to try.

这样应该怎么办?求 dalao 帮助

7132 次点击
所在节点    MongoDB
6 条回复
janxin
2016-06-29 13:27:05 +08:00
你访问国外网址有点问题...
Techxiu
2016-06-29 13:35:17 +08:00
@janxin 刚刚又试了下安装成功了,但是发帖的时候是真的 404 ,有挂代理试过
DoraJDJ
2016-06-29 13:43:43 +08:00
直接下载 Binary 运行不方便吗?
Techxiu
2016-06-29 13:49:15 +08:00
@DoraJDJ 还是喜欢直接 yum 装
lslqtz
2016-06-29 15:12:32 +08:00
下包编译大法好
Neveroldmilk
2016-06-29 15:28:19 +08:00
有时候官方的源会被暂时屏蔽的,最好使用国内镜像。

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/289092

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX