只要思想不滑坡,办法总比困难多!
我有好几次遇到docker attach进到容器,没有vi/vim/nano/怎么办?而且默认源还报错?很是心烦
这里给出几种解决方案
1.wget下载vi编辑器手动安装
2.echo命令把源换成国内的,然后apt-get update
mv /etc/apt/sources.list /etc/apt/sources.list.bak
echo 'deb http://mirrors.163.com/debian/ jessie main non-free contrib' > /etc/apt/sources.list
echo 'deb http://mirrors.163.com/debian/ jessie-updates main non-free contrib' >> /etc/apt/sources.list
echo 'deb http://mirrors.163.com/debian-security/ jessie/updates main non-free contrib' >> /etc/apt/sources.list
然后就可以愉快地玩耍了