> 文章列表 > docker安装vim报错E: Unable to locate package vim

docker安装vim报错E: Unable to locate package vim

docker安装vim报错E: Unable to locate package vim

原因:debian源不适用

解决方法

1、更换镜像源:

echo  "deb http://mirrors.tuna.tsinghua.edu.cn/debian/ buster main contrib non-free" >/etc/apt/sources.list

echo  "deb http://mirrors.tuna.tsinghua.edu.cn/debian/ buster-updates main contrib non-free" >>/etc/apt/sources.list

echo  "deb http://mirrors.tuna.tsinghua.edu.cn/debian/ buster-backports main contrib non-free" >>/etc/apt/sources.list

echo  "deb http://mirrors.tuna.tsinghua.edu.cn/debian-security buster/updates main contrib non-free" >>/etc/apt/sources.list

2、执行:

apt-get update

apt-get install -y vim