今天在使用 yum 安装 mongodb时,报了这个错误
sudo yum install -y mongodb-org
[[email protected] yum]$ sudo yum install -y mongodb-org
Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
* base: mirrors.zju.edu.cn
* extras: centos.ustc.edu.cn
* updates: mirrors.cqu.edu.cn
Resolving Dependencies
--> Running transaction check
---> Package mongodb-org.x86_64 0:3.4.17-1.el6 will be installed
--> Processing Dependency: mongodb-org-tools = 3.4.17 for package: mongodb-org-3.4.17-1.el6.x86_64
--> Processing Dependency: mongodb-org-shell = 3.4.17 for package: mongodb-org-3.4.17-1.el6.x86_64
--> Processing Dependency: mongodb-org-server = 3.4.17 for package: mongodb-org-3.4.17-1.el6.x86_64
--> Processing Dependency: mongodb-org-mongos = 3.4.17 for package: mongodb-org-3.4.17-1.el6.x86_64
--> Running transaction check
---> Package mongodb-org-mongos.x86_64 0:3.4.17-1.el6 will be installed
---> Package mongodb-org-server.x86_64 0:3.4.17-1.el6 will be installed
---> Package mongodb-org-shell.x86_64 0:3.4.17-1.el6 will be installed
---> Package mongodb-org-tools.x86_64 0:3.4.17-1.el6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
========================================================================================
Package Arch Version Repository Size
========================================================================================
Installing:
mongodb-org x86_64 3.4.17-1.el6 mongodb-org-3.4 5.8 k
Installing for dependencies:
mongodb-org-mongos x86_64 3.4.17-1.el6 mongodb-org-3.4 12 M
mongodb-org-server x86_64 3.4.17-1.el6 mongodb-org-3.4 20 M
mongodb-org-shell x86_64 3.4.17-1.el6 mongodb-org-3.4 11 M
mongodb-org-tools x86_64 3.4.17-1.el6 mongodb-org-3.4 50 M
Transaction Summary
========================================================================================
Install 5 Package(s)
Total size: 93 M
Total download size: 93 M
Installed size: 260 M
Downloading Packages:
https://repo.mongodb.org/yum/redhat/6/mongodb-org/3.4/x86_64/RPMS/mongodb-org-mongos-3.4.17-1.el6.x86_64.rpm: [Errno 14] problem making ssl connection
Trying other mirror.
https://repo.mongodb.org/yum/redhat/6/mongodb-org/3.4/x86_64/RPMS/mongodb-org-server-3.4.17-1.el6.x86_64.rpm: [Errno 14] problem making ssl connection
Trying other mirror.
https://repo.mongodb.org/yum/redhat/6/mongodb-org/3.4/x86_64/RPMS/mongodb-org-shell-3.4.17-1.el6.x86_64.rpm: [Errno 14] problem making ssl connection
Trying other mirror.
https://repo.mongodb.org/yum/redhat/6/mongodb-org/3.4/x86_64/RPMS/mongodb-org-tools-3.4.17-1.el6.x86_64.rpm: [Errno 14] problem making ssl connection
Trying other mirror.
Error Downloading Packages:
mongodb-org-server-3.4.17-1.el6.x86_64: failure: RPMS/mongodb-org-server-3.4.17-1.el6.x86_64.rpm from mongodb-org-3.4: [Errno 256] No more mirrors to try.
mongodb-org-tools-3.4.17-1.el6.x86_64: failure: RPMS/mongodb-org-tools-3.4.17-1.el6.x86_64.rpm from mongodb-org-3.4: [Errno 256] No more mirrors to try.
mongodb-org-mongos-3.4.17-1.el6.x86_64: failure: RPMS/mongodb-org-mongos-3.4.17-1.el6.x86_64.rpm from mongodb-org-3.4: [Errno 256] No more mirrors to try.
mongodb-org-shell-3.4.17-1.el6.x86_64: failure: RPMS/mongodb-org-shell-3.4.17-1.el6.x86_64.rpm from mongodb-org-3.4: [Errno 256] No more mirrors to try.
查半天说是 因为无法访问国外网址,后来将mongodb-org-3.4.repo中的https 改为 http,问题解决
sudo vi mongodb-org-3.4.repo
安装成功!