1.默认的源是国外的,apt-get安装的时候会失败,我们更新成国内的源
2.备份源:sudo cp /etc/apt/sources.list /etc/apt/sources.list_back
3.编辑sources.list
打开终端 sudo nano /etc/apt/sources.list
添加国内源(阿里源)
(确定系统别名“lsb_release -a”命令查看系统的Code name,将buster字段改成相应的Code name即可)
deb https://mirrors.aliyun.com/raspbian/raspbian/ buster main non-free contrib
deb-src https://mirrors.aliyun.com/raspbian/raspbian/ buster main non-free contrib
我的是树莓派3b:
deb https://mirrors.aliyun.com/raspbian/raspbian/ stretch main non-free contrib
deb-src https://mirrors.aliyun.com/raspbian/raspbian/ stretch main non-free contrib
3.sudo apt-get update更新源
4.sudo apt-get install vim 安装新版vim