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 帮助
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.