docker容器中 bash: vi: command not found,docker apt-get 异常 Temporary failure resolving
程序员文章站
2022-04-04 23:48:49
...
bash: vi: command not found,
场景:
因为 docker里面没有这个命令,我们安装一下
apt-get update
apt-get install vim
如果 这个时候 安装也还是会出现 异常
aaa@qq.com446d7cf1606c:/etc/mysql# apt-get update
Err:1 http://security.debian.org/debian-security buster/updates InRelease
Temporary failure resolving 'security.debian.org'
Err:2 http://repo.mysql.com/apt/debian buster InRelease
Temporary failure resolving 'repo.mysql.com'
Err:3 http://deb.debian.org/debian buster InRelease
Temporary failure resolving 'deb.debian.org'
0% [Connecting to deb.debian.org]
Err:4 http://deb.debian.org/debian buster-updates InRelease
Temporary failure resolving 'deb.debian.org'
Reading package lists... Done
W: Failed to fetch http://deb.debian.org/debian/dists/buster/InRelease Temporary failure resolving 'deb.debian.org'
W: Failed to fetch http://security.debian.org/debian-security/dists/buster/updates/InRelease Temporary failure resolving 'security.debian.org'
W: Failed to fetch http://deb.debian.org/debian/dists/buster-updates/InRelease Temporary failure resolving 'deb.debian.org'
W: Failed to fetch http://repo.mysql.com/apt/debian/dists/buster/InRelease Temporary failure resolving 'repo.mysql.com'
W: Some index files failed to download. They have been ignored, or old ones used instead.
aaa@qq.com446d7cf1606c:/etc/mysql#
从 异常我们可以看出来,安装找不到源。
解决方法:
sudo systemctl restart docker
对没错,重启docker即可。目的是为了,让源…等等配置文件重新启动,然后再重新对接接口下载。
没问题了。
上一篇: iOS 13体验:这些细节“真香”
下一篇: 小米9T系列宣布:6月12日发