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 I've tried sudo apt-get update && sudo apt-get upgrade but no effect, same problem.
I've just installed Ubuntu. vim works but A B C D are printed when arrow keys are pressed.
# deb cdrom:[Ubuntu 13.04 _Raring Ringtail_ - Release amd64 (20130424)]/ raring main restricted # See for how to upgrade to # newer versions of the distribution. deb raring main restricted deb-src raring main restricted ## Major bug fix updates produced after the final release of the ## distribution. deb raring-updates main restricted deb-src raring-updates main restricted ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu ## team. Also, please note that software in universe WILL NOT receive any ## review or updates from the Ubuntu security team. deb raring universe deb-src raring universe deb raring-updates universe deb-src raring-updates universe ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu ## team, and may not be under a free licence. Please satisfy yourself as to ## your rights to use the software. Also, please note that software in ## multiverse WILL NOT receive any review or updates from the Ubuntu ## security team. deb raring multiverse deb-src raring multiverse deb raring-updates multiverse deb-src raring-updates multiverse ## N.B. software from this repository may not have been tested as ## extensively as that contained in the main release, although it includes ## newer versions of some applications which may provide useful features. ## Also, please note that software in backports WILL NOT receive any review ## or updates from the Ubuntu security team. deb raring-backports main restricted universe multiverse deb-src raring-backports main restricted universe multiverse deb raring-security main restricted deb-src raring-security main restricted deb raring-security universe deb-src raring-security universe deb raring-security multiverse deb-src raring-security multiverse ## Uncomment the following two lines to add software from Canonical's ## 'partner' repository. ## This software is not part of Ubuntu, but is offered by Canonical and the ## respective vendors as a service to Ubuntu users. # deb raring partner # deb-src raring partner ## This software is not part of Ubuntu, but is offered by third-party ## developers who want to ship their latest software. deb raring main deb-src raring main 23 Answers
Jorge Castro suggested: "you can use deb mirror to have the best mirror picked for you automatically.
apt-get now supports a 'mirror' method that will automatically select a good mirror based on your location. Putting: deb mirror:// precise main restricted universe multiverse deb mirror:// precise-updates main restricted universe multiverse deb mirror:// precise-backports main restricted universe multiverse deb mirror:// precise-security main restricted universe multiverse IT WORKED FOR ME! I added the above lines in
/etc/apt/sources.list at the top and then I
sudo apt-get update and then
sudo apt-get install vim WORKS!
1From browsing around it seems that the mirror you are using is out of date. You should try changing your mirror to something different, that should then fix the error:
- How can I get apt to use a mirror close to me, or choose a faster mirror?
- How do you select the fastest mirror from the command line?
You need to add the deb-src repo to your sources.list.
sudo nano /etc/apt/sources.list Remove the # from the line that starts with #deb-src then Ctrl+o, Enter, Ctrl+x to save and exit from nano.
sudo apt-get update sudo install vim And vim will be installed.