partake2012 2017-04-19 07:54 采纳率: 100%
浏览 2490
已采纳

docker ce 注册apt源时遇到问题

今天尝试安装docker最新社区版,在注册官方安装源的时候遇到问题。

按官方文档所述,已经安装好apt的https模块,下载并验证了证书。执行如下语句注册官方源

sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"

执行后,/etc/apt/source.list如下:

……
deb [arch=amd64] https://download.docker.com/linux/ubuntu trusty stable
# deb-src [arch=amd64] https://download.docker.com/linux/ubuntu trusty stable
……

此时执行更新命令apt-get update,报如下异常

……
Ign https://download.docker.com trusty InRelease

Ign https://download.docker.com trusty Release.gpg
Ign https://download.docker.com trusty Release
Err https://download.docker.com trusty/stable amd64 Packages
Bad header line
Ign https://download.docker.com trusty/stable Translation-en_US
Ign https://download.docker.com trusty/stable Translation-en
Fetched 68.8 MB in 2min 0s (574 kB/s)
W: Failed to fetch https://download.docker.com/linux/ubuntu/dists/trusty/stable/binary-amd64/Packages Bad header line
E: Some index files failed to download. They have been ignored, or old ones used instead.

清除缓存(rm -Rf /var/lib/apt/lists/*)后再次执行更新依然是上述异常。

谁有过类似问题解决经历或者解决思路,请不吝赐教!

  • 写回答

2条回答

  • partake2012 2017-04-21 01:47
    关注

    貌似原因是部分链接在大陆无法访问,但具体是哪些我没有亲自试。目前解决办法是直接下载安装包进行安装。如果哪位同学找到更好的解决办法,也请说一下。

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 如何实现H5在QQ平台上的二次分享卡片效果?
  • ¥15 python爬取bilibili校园招聘网站
  • ¥30 求解达问题(有红包)
  • ¥15 请解包一个pak文件
  • ¥15 不同系统编译兼容问题
  • ¥100 三相直流充电模块对数字电源芯片在物理上它必须具备哪些功能和性能?
  • ¥30 数字电源对DSP芯片的具体要求
  • ¥20 antv g6 折线边如何变为钝角
  • ¥30 如何在Matlab或Python中 设置饼图的高度
  • ¥15 nginx中的CORS策略应该如何配置