无法使用 apt-get 安装软件包

无法使用 apt-get 安装软件包

我试图安装 vim 和 g++,但安装不上。我现在使用的是 Ubuntu 10.10。我尝试了网上的所有方法,但都没用。每次我安装时都是这样。

root@ubuntu:~#  apt-get install vim vim-scripts vim-doc vim-latexsuite vim-gui-common vim gnome
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
E: Unable to locate package vim-scripts
E: Unable to locate package vim-doc
E: Unable to locate package vim-latexsuite
E: Unable to locate package vim-gui-common
E: Package 'vim' has no installation candidate
E: Unable to locate package gnome

我该如何解决?

答案1

您正在尝试安装一个名为“gnome”的软件包,但它似乎不是一个完全有效的软件包名称:

E: 无法找到软件包 gnome

从命令中删除“gnome”并重试:

sudo apt-get update && sudo apt-get install vim vim-scripts vim-doc vim-latexsuite vim-gui-common

答案2

看看那个

root@ubuntu:~#  apt-get install **vim** vim-scripts vim-doc vim-latexsuite vim-gui-common **vim gnome**

你正在vim按照你的命令两次,侏儒不是有效的软件包。我认为您正在尝试安装vim-gnome代替 ”vim 侏儒“。

尝试一下

# apt-get update
# apt-get install vim vim-scripts vim-doc vim-latexsuite vim-gui-common vim-gnome

相关内容