apt-get update时跳过InRelease步骤(直接进入Release)

我刚刚在服务器上安装了一个新的Xenial,几乎立即尝试在其上安装Docker

Docker安装页面说,你必须创build一个/etc/apt/sources.list.d/docker.list文件,并在其中添加docker repo源代码:

 deb https://apt.dockerproject.org/repo ubuntu-xenial main 

然后,只要通过正常的apt-get update & install过程。 这一步通常很容易,但在这个全新的xenial上, update步骤一直超时:

 Failed to fetch https://apt.dockerproject.org/repo/dists/ubuntu-xenial/InRelease Connection timed out after 120000 milliseconds 

这里重要的一点是Docker告诉我他们没有InRelease回购。 通常, apt-get update应尝试InRelease步骤,找不到签名的内联源,然后尝试释放源。

我的问题是,我的全新Xenial停在那里没有尝试Release源。

我如何强制Ubuntu检查https://apt.dockerproject.org/repo/dists/ubuntu-xenial/Release源代替https://apt.dockerproject.org/repo/dists/ubuntu-xenial/InRelease

如果需要,这里是uname -a结果:

 Linux sd-83589 4.4.0-22-generic #40-Ubuntu SMP Thu May 12 22:03:46 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux 

我没有问题安装其他软件包(zsh,屏幕等..)

请随时问我任何额外的信息:我在这方面的知识的方式,所以我可能已经忘记了一些东西…

感谢@ Law29我知道有些更新是在HTTPS的时候使用HTTP进行的:/

我可以检查curl HTTPS请求不会到达服务器。

原来是我的防火墙没有configuration为接受端口443请求…添加正确的线路解决了这个问题! 感谢@ Law29!

我有同样的问题。 /etc/apt/apt.conf导致问题:

 Acquire::http::Proxy "http://mirrors.aliyun.com/"; 

删除这个文件后,现在一切正常。


更新

我也可以通过添加另一行来绕过Docker回购:

 Acquire::http::Proxy "http://mirrors.aliyun.com/"; Acquire::http::Proxy::apt.dockerproject.org DIRECT;