Unable to install packages with apt-get

I was trying to install vim and g++ but I couldn't. Presently I'm using Ubuntu 10.10. I tried all that I went through the net, but no use. This how it appears every time I do.

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

How do I fix this?


You are trying to install a package named 'gnome', that does not seem like a fully valid package name:

E: Unable to locate package gnome

Remove 'gnome' from your command and try again:

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

Take a look at that

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

You are putting vim twice on your command and gnome is not a valid package. I think you are trying to install vim-gnome instead of "vim gnome".

Try that

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