0

大家好,

我正在尝试在我的 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?                

我也附上屏幕截图。会是什么原因?vim安装错误

4

1 回答 1

1

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

$ ping deb.debian.org

你也会得到一个错误。

我建议您阅读此内容

于 2019-03-05T13:17:45.097 回答