博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
openssh-client amd64 1:7.2p2-4ubuntu2.4 404 Not Found
阅读量:4179 次
发布时间:2019-05-26

本文共 2156 字,大约阅读时间需要 7 分钟。

一直运转良好的Docker自动发布突然出现了如下异常,导致无法准确构建image。

Step 3 : RUN apt-get update...Step 8 : RUN apt-get install -y openssh-client ---> Using cacheThe following NEW packages will be installed:  krb5-locales libbsd0 libedit2 libgssapi-krb5-2 libk5crypto3 libkeyutils1  libkrb5-3 libkrb5support0 libx11-6 libx11-data libxau6 libxcb1 libxdmcp6  libxext6 libxmuu1 openssh-client xauth...Err:16 http://security.ubuntu.com/ubuntu xenial-security/main amd64 openssh-client amd64 1:7.2p2-4ubuntu2.4  404  Not Found [IP: 91.189.88.162 80]...Err:16 http://security.ubuntu.com/ubuntu xenial-security/main amd64 openssh-client amd64 1:7.2p2-4ubuntu2.4  404  Not Found [IP: 91.189.88.162 80]Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/o/openssh/openssh-client_7.2p2-4ubuntu2.4_amd64.deb  404  Not FoundE: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

访问软件包发布磁盘http://security.ubuntu.com/ubuntu/pool/main/o/openssh/,发现确实没有了要获取的openssh-client_7.2p2-4ubuntu2.4_amd64.deb文件,但是存在如下文件:

  • openssh-client_7.2p2-4ubuntu2.6_amd64.deb文件,发布时间为2018.11.6

访问https://pkgs.org/download/openssh-client,发现Ubuntu 16.04中可用的openssh-client如下,确实已经不用openssh-client_7.2p2-4ubuntu2.4_amd64.deb了:

  • openssh-client_7.2p2-4_amd64.deb
  • openssh-client_7.2p2-4ubuntu2.6_amd64.deb
  • openssh-client-ssh1_7.2p2-4_amd64.deb,仅适用于遗留的SSH1
  • openssh-client-ssh1_7.2p2-4ubuntu2.6_amd64.deb,仅适用于遗留的SSH1

访问https://launchpad.net/ubuntu/xenial/amd64/openssh-client,查看openssh-client在Ubuntu 16.04的发布历史记录如下:

  • 2018-11-07删除1:7.2p2-4ubuntu2.5
  • 2018-11-07删除1:7.2p2-4ubuntu2.4
  • 2018-11-06发布1:7.2p2-4ubuntu2.6
  • 2018-10-19发布1:7.2p2-4ubuntu2.5
  • 2018-01-22发布1:7.2p2-4ubuntu2.4
  • 2018-01-22删除1:7.2p2-4ubuntu2.2
  • 2017-05-13发布1:7.2p2-4ubuntu2.2
  • ...

原因已经一目了然了,在Ubuntu 16.04的软件包中,openssh-client已经于2018.11.06升级到1:7.2p2-4ubuntu2.6,而且过时的1:7.2p2-4ubuntu2.4已经被随后删除。但是在我们的docker build命令中,仍然试图获取已经被删除的1:7.2p2-4ubuntu2.4,所以构建失败。

那么,为什么在apt-get update之后,仍然会试图访问过时的openssh-client软件包呢?

我们看到了构建日志中紧随语句RUN apt-get install -y openssh-client的“Using cache”。原来,在Docker构建镜像的过程中,为了加快进度,在Docker命令不变的情况下,默认使用了缓存。查看docker build命令,禁用构建缓存如下:

        docker build --no-cache ...
顺利解决构建镜像过程中的缓存,获取最新的openssh-client_7.2p2-4ubuntu2.6_amd64.deb。

转载地址:http://jqlai.baihongyu.com/

你可能感兴趣的文章
JAVA 洗衣房管理系统 宿舍洗衣机管理系统
查看>>
基于SSM的街道办安全管理系统 JAVA
查看>>
基于SSM的论文选题管理系统 JAVA
查看>>
生成器模式
查看>>
工厂方法模式
查看>>
阿里规范(一)关于CountDownLatch和ThreadLocalRandom的详解(带测试代码)
查看>>
Mysql 函数 STR_TO_DATE
查看>>
Commons CLI 使用介绍
查看>>
Mybatis 缓存实现原理——案例实践
查看>>
Mybatis 缓存实现原理
查看>>
怎么提升SQL查询效率
查看>>
预编译防止sql注入
查看>>
覆盖equals方法时总是要覆盖hashCode
查看>>
clone详解
查看>>
【Java并发编程实战】——AbstractQueuedSynchronizer源码分析(一)
查看>>
【Java并发编程实战】——并发编程基础
查看>>
【Java并发编程实战】——Java内存模型与线程
查看>>
【Java并发编程实战】——AbstractQueuedSynchronizer源码分析(二)
查看>>
【Java并发编程实战】——Semaphore源码分析
查看>>
【Java并发编程实战】——CyclicBarrier源码分析
查看>>