卸载了vim,现在不能再安装了

fok*_*oki 3 vim apt vi 14.04

我已经删除了 vim-tiny 以按照本教程进行完整安装 ,现在我无法通过以下方式安装 vim:

$ sudo apt-get install vim
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package vim is not available, but is referred to by another package.
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
Run Code Online (Sandbox Code Playgroud)

如果我只是尝试再次安装 vim-tiny,情况是一样的:

$ sudo apt-get install vim-tiny
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package vim-tiny is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'vim-tiny' has no installation candidate
Run Code Online (Sandbox Code Playgroud)

的输出vim -version是:

$ vim -version
The program 'vim' can be found in the following packages:
 * vim
 * vim-gnome
 * vim-tiny
 * vim-athena (You will have to enable component called 'universe')
 * vim-gtk (You will have to enable component called 'universe')
 * vim-nox (You will have to enable component called 'universe')
Try: sudo apt-get install <selected package>
Run Code Online (Sandbox Code Playgroud)

我也试过了sudo apt-get updatesudo apt-get upgrade而且sudo apt-get dist-upgrade都是一样的。我正在使用 Ubuntu 14.04 LTS。这对我来说是很奇怪的情况,sudo apt-get remove vim-tinysudo apt-get install vim-tiny在此之后无法执行。有什么帮助吗?

Pan*_*dya 5

vim可在Ubuntu 的主存储库中找到。

主要成分包含的免费软件,可自由重新分配和Ubuntu团队完全支持的应用程序。& Universe组件是免费、开源和 Linux 世界的快照。

因此,首先启用 Main & Universe 存储库:

sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) main universe"
Run Code Online (Sandbox Code Playgroud)

然后通过以下命令安装软件包:

sudo apt-get update
sudo apt-get install vim
Run Code Online (Sandbox Code Playgroud)

以下对更多有用(访问 unmet-dependencies 和无法定位包):