卸载了 vim,现在无法再次安装

卸载了 vim,现在无法再次安装

我已经删除了 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

如果我再次尝试安装 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

的输出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>

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

答案1

vim可在主存储库Ubuntu。

主要的组件包含的应用程序是免费软件,可以自由重新分发,并受到 Ubuntu 团队的全力支持。&宇宙组件是自由、开源和 Linux 世界的快照。

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

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

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

sudo apt-get update
sudo apt-get install vim

以下内容有助于了解更多信息(访问未满足的依赖关系和无法找到包):

相关内容