执行命令1
# 清空/etc/apt/sources.list文件
echo > /etc/apt/sources.list
执行命令2
echo -e "deb http://mirrors.aliyun.com/debian/ stretch main non-free contrib \ndeb-src http://mirrors.aliyun.com/debian/ stretch main non-free contrib \ndeb http://mirrors.aliyun.com/debian-security stretch/updates main \ndeb-src http://mirrors.aliyun.com/debian-security stretch/updates main \ndeb http://mirrors.aliyun.com/debian/ stretch-updates main non-free contrib \ndeb-src http://mirrors.aliyun.com/debian/ stretch-updates main non-free contrib \ndeb http://mirrors.aliyun.com/debian/ stretch-backports main non-free contrib \ndeb-src http://mirrors.aliyun.com/debian/ stretch-backports main non-free contrib" > /etc/apt/sources.list
测试一下
apt-get update
安装vim不成功
原因是:
vim : Depends: libtinfo5 (>= 6) but it is not going to be installed
依赖库版本过低导致,先安装依赖
apt-get install -y libtinfo5 --allow-remove-essential
然后再安装vim
apt-get install -y vim
版权声明:本文为qq_36973540原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。