首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法在docker容器中安装VI编辑器/vim

无法在docker容器中安装VI编辑器/vim
EN

Stack Overflow用户
提问于 2019-03-05 15:43:21
回答 1查看 609关注 0票数 0

大家好,

我正在尝试将vim安装到我的docker pulsar (我在docker容器中拉出了脉冲星图像)容器中,我在我的windows机器中有docker。我使用了两个命令,两个命令都失败了.

第一个: apt-get update

代码语言:javascript
复制
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

代码语言:javascript
复制
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?                

我是附加屏幕截图以及。原因是什么?

EN

回答 1

Stack Overflow用户

发布于 2019-03-05 21:17:45

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

代码语言:javascript
复制
$ ping deb.debian.org

您还会得到一个错误。

我建议你阅读this

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/54997691

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档