linux apt-get install 错误: Package has no installation candidate

sudo apt-get install vim

在安装vim时报如下错误:

Error accoured:

This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'vim' has no installation candidate

 

上网查了许多资料,发现是库未更新,依次执行如下命令:

1 sudo apt-get update
2 sudo apt-get upgrade

更新完毕后执行命令  sudo apt-get install vim 然后成功安装vim

 

转载于:https://www.cnblogs.com/fengxm/p/5946031.html

你可能感兴趣的:(linux apt-get install 错误: Package has no installation candidate)