直接使用 sudo apt-get install vim 报错
root@ubuntu:~# sudo apt-get install vim
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
vim : Depends: vim-common (= 2:8.0.1453-1ubuntu1.4) but 2:8.1.2269-1ubuntu5 is to be installed
E: Unable to correct problems, you have held broken packages.
安装方法
1、删除vim-common包及配置文件
sudo apt-get purge vim-common
2、更新软件源
sudo apt-get update
3、更新软件
sudo apt-get upgrade
4、重新安装vim
sudo apt-get install vim