Package ‘vim’ has no installation candidate
需要更新 apt-get 的镜像源
打开配置文件
sudo vi /etc/apt/sources.list
使用新的镜像源,如,使用 Aliyun 的镜像
#deb http://mirrordirector.raspbian.org/raspbian/ jessie main contrib non-free rpi
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://archive.raspbian.org/raspbian/ jessie main contrib non-free rpi
deb http://mirrors.aliyun.com/raspbian/raspbian/ wheezy main non-free contrib
更新包列表
sudo apt-get update
sudo apt-get upgrade
再次安装
sudo apt-get install vim
Unable to correct problems, you have held broken packages.
sudo apt-get remove vim-common # 引起错误的包
sudo apt-get clean && sudo apt-get purge
sudo apt-get update && sudo apt-get install vim
WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! … ECDSA host key for xxx.xxx.x.xxx has changed and you have requested strict checking
清除之前的缓存
ssh-keygen -R xxx.xxx.x.xxx