按照这些说明操作http://docs.mongodb.org/master/tutorial/install-mongodb-on-ubuntu/关于如何安装 mongodb,我收到一个错误:
$ sudo apt-get install mongodb-org
[sudo] password for alex:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
libjpeg62 python-colorama python-distlib python-html5lib
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
mongodb-org-mongos mongodb-org-server mongodb-org-shell mongodb-org-tools
The following NEW packages will be installed:
mongodb-org mongodb-org-mongos mongodb-org-server mongodb-org-shell
mongodb-org-tools
0 upgraded, 5 newly installed, 0 to remove and 15 not upgraded.
Need to get 50.7 MB of archives.
After this operation, 157 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
WARNING: The following packages cannot be authenticated!
mongodb-org-shell mongodb-org-server mongodb-org-mongos mongodb-org-tools
mongodb-org
Install these packages without verification? [y/N] y
Err http://repo.mongodb.org/apt/ubuntu/ trusty/mongodb-org/3.0/multiverse mongodb-org-shell amd64 3.0.5
407 Proxy Authentication Required
Err http://repo.mongodb.org/apt/ubuntu/ trusty/mongodb-org/3.0/multiverse mongodb-org-server amd64 3.0.5
407 Proxy Authentication Required
Err http://repo.mongodb.org/apt/ubuntu/ trusty/mongodb-org/3.0/multiverse mongodb-org-mongos amd64 3.0.5
407 Proxy Authentication Required
Err http://repo.mongodb.org/apt/ubuntu/ trusty/mongodb-org/3.0/multiverse mongodb-org-tools amd64 3.0.5
407 Proxy Authentication Required
Err http://repo.mongodb.org/apt/ubuntu/ trusty/mongodb-org/3.0/multiverse mongodb-org amd64 3.0.5
407 Proxy Authentication Required
E: Failed to fetch http://repo.mongodb.org/apt/ubuntu/dists/trusty/mongodb-org/3.0/multiverse/binary-amd64/mongodb-org-shell_3.0.5_amd64.deb 407 Proxy Authentication Required
E: Failed to fetch http://repo.mongodb.org/apt/ubuntu/dists/trusty/mongodb-org/3.0/multiverse/binary-amd64/mongodb-org-server_3.0.5_amd64.deb 407 Proxy Authentication Required
E: Failed to fetch http://repo.mongodb.org/apt/ubuntu/dists/trusty/mongodb-org/3.0/multiverse/binary-amd64/mongodb-org-mongos_3.0.5_amd64.deb 407 Proxy Authentication Required
E: Failed to fetch http://repo.mongodb.org/apt/ubuntu/dists/trusty/mongodb-org/3.0/multiverse/binary-amd64/mongodb-org-tools_3.0.5_amd64.deb 407 Proxy Authentication Required
E: Failed to fetch http://repo.mongodb.org/apt/ubuntu/dists/trusty/mongodb-org/3.0/multiverse/binary-amd64/mongodb-org_3.0.5_amd64.deb 407 Proxy Authentication Required
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
我上网时没有使用任何代理。
答案1
从命令行,看看是否可以执行以下操作:
$ echo "GET / HTTP/1.1
>
> " | nc repo.mongodb.org 80
笔记注意引号,在 netcat 后面加了两个回车符(在您的系统上可能称为 nc)。您应该会得到如下响应。如果没有安装 netcat,那么您也可以使用 telnet(如果恰好安装了的话)。
HTTP/1.1 400 错误请求服务器:CloudFront 日期:2015 年 8 月 6 日星期四 17:39:05 GMT 内容类型:text/html 内容长度:551 连接:关闭 X-Cache:来自 cloudfront 的错误 Via:1.1 7dcd2c4f2f9e03bee8b952ac4503c140.cloudfront.net (CloudFront) X-Amz-Cf-Id:A4aLCzPa4Wfqfp5eKZRWTLrU79JdCrd7C0lDPfyj39fynCyZr_SI0A==
错误:无法满足请求
错误
該请求無法夠滿足。
错误的请求。由cloudfront(CloudFront)生成的请求ID: A4aLCzPa4Wfqfp5eKZRWTLrU79JdCrd7C0lDPfyj39fynCyZr_SI0A==
如果您没有得到这个,那么您的 HTTP 连接就会被某种代理拦截,可能是 TCP 代理或透明代理 - 您需要与您的网络提供商联系以获取更多信息。