无法在Docker容器中安装VI Editor / vim

时间:2019-03-05 07:43:21

标签: windows docker vim apache-pulsar

大家好,

我正在尝试在docker pulsar(我在docker容器中拉出pulsar映像)容器中安装vim,我的Windows机器中有docker。 我用了两个命令                        这两个命令都失败了.....

首先:apt-get更新

Err:1 http://security.debian.org/debian-security stretch/updates InRelease
Could not resolve 'security.debian.org'
Err:2 http://deb.debian.org/debian stretch InRelease
Could not resolve 'deb.debian.org'
Err:3 http://deb.debian.org/debian stretch-updates InRelease
Could not resolve 'deb.debian.org'
Reading package lists... Done
W: Failed to fetch http://deb.debian.org/debian/dists/stretch/InRelease  
Could not resolve 'deb.debian.org'
W: Failed to fetch http://deb.debian.org/debian/dists/stretch- 
updates/InRelease  Could not resolve 'deb.debian.org'
W: Failed to fetch http://security.debian.org/debian- 
security/dists/stretch/updates/InRelease  Could not resolve ' 
'security.debian.org'
W: Some index files failed to download. They have been ignored, or old ones 
used instead.

第二次:apt-get install vim

libgpm2 vim vim-common vim-runtime xxd
0 upgraded, 5 newly installed, 0 to remove and 10 not upgraded.
Need to get 6766 kB of archives.
After this operation, 31.2 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Err:1 http://deb.debian.org/debian stretch/main amd64 xxd amd64 2:8.0.0197- 
4+deb9u1
Could not resolve 'deb.debian.org'
Err:2 http://deb.debian.org/debian stretch/main amd64 vim-common all 
2:8.0.0197-4+deb9u1
Could not resolve 'deb.debian.org'
Err:3 http://deb.debian.org/debian stretch/main amd64 libgpm2 amd64 1.20.4- 
6.2+b1
Could not resolve 'deb.debian.org'
Err:4 http://deb.debian.org/debian stretch/main amd64 vim-runtime all 
2:8.0.0197-4+deb9u1
Could not resolve 'deb.debian.org'
Err:5 http://deb.debian.org/debian stretch/main amd64 vim amd64 2:8.0.0197- 
4+deb9u1
Could not resolve 'deb.debian.org'
E: Failed to fetch 
http://deb.debian.org/debian/pool/main/v/vim/xxd_8.0.0197-4+deb9u1_amd64.deb  
Could not resolve 'deb.debian.org'
E: Failed to fetch http://deb.debian.org/debian/pool/main/v/vim/vim- 
common_8.0.0197-4+deb9u1_all.deb  Could not resolve 'deb.debian.org'
E: Failed to fetch 
http://deb.debian.org/debian/pool/main/g/gpm/libgpm2_1.20.4-6.2+b1_amd64.deb  
Could not resolve 'deb.debian.org'
E: Failed to fetch http://deb.debian.org/debian/pool/main/v/vim/vim- 
runtime_8.0.0197-4+deb9u1_all.deb  Could not resolve 'deb.debian.org'
E: Failed to fetch 
http://deb.debian.org/debian/pool/main/v/vim/vim_8.0.0197-4+deb9u1_amd64.deb  
Could not resolve 'deb.debian.org'
E: Unable to fetch some archives, maybe run apt-get update or try with -- 
fix-missing?                

我还要附加屏幕截图。 原因是什么?{error in vim installation

1 个答案:

答案 0 :(得分:1)

您的DNS存在问题。我敢肯定,如果您这样做:

$ ping deb.debian.org

您还将收到一个错误。

我建议您阅读this