无法在Docker的ubuntu 16.04上安装openssh-server

问题描述 投票:0回答:1

我有一个带有全新安装的Ubuntu 16.04的Docker容器,安装openssh-server后无法成功安装openssh-client。我确保按照这里的指示进行操作:https://help.ubuntu.com/lts/serverguide/openssh-server.html

我正在运行的命令是...

apt-get clean
apt-get update
apt-get install -y --fix-missing openssh-server

将导致以下错误。

E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/n/ncurses/ncurses-term_6.0+20160213-1ubuntu1_all.deb Bad header line Bad header data [IP: 91.189.88.174 80]

[我注意到它试图从中获取文件的URL是http://archive.ubuntu.com而不是us.archive.ubuntu.com,我认为这是可以的,但不确定为什么会有所不同。

我可以在浏览器中成功导航到http://archive.ubuntu.com,但是在ping时出现错误。如果不执行http://],我可以ping通

$ ping http://archive.ubuntu.com
ping: cannot resolve http://archive.ubuntu.com: Unknown host

$ ping archive.ubuntu.com
PING archive.ubuntu.com (91.189.88.173): 56 data bytes
64 bytes from 91.189.88.173: icmp_seq=0 ttl=52 time=94.518 ms

我可以在浏览器中成功ping通并导航到us.archive.ubuntu.com

$ ping us.archive.ubuntu.com
PING us.archive.ubuntu.com (91.189.91.24): 56 data bytes
64 bytes from 91.189.91.24: icmp_seq=0 ttl=54 time=33.831 ms

我有一个带有全新安装的Ubuntu 16.04的Docker容器,在安装openssh-client之后,我无法成功安装openssh-server。我确保按照这里的指示进行操作:https:/ ...

docker ubuntu-16.04 openssh
1个回答
0
投票

如果不使用http://,我可以ping通>

© www.soinside.com 2019 - 2024. All rights reserved.