1

I am running Ubuntu 13.04 and I assumed that vim comes by default. There is a /etc/vim on my system (assuming it refers to the same thing). However, I was unable to do a vim abc.txt. Instead, I got a reply stating that vim is not recognized. Please refer to the following and provide me a solution.

rahul@hpdv6:~/Downloads/VIM/vim64/src$ 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
rahul@hpdv6:~/Downloads/VIM/vim64/src$ 

Thanks in advance.

7
  • Hi belacqua, apt-cache search ^vim shows nothing. May 10 '13 at 23:56
  • I do, but the letters 'v', 'i' and 'm' are in red. Is that a concern ? May 11 '13 at 0:01
  • I get the following message - rahul@hpdv6:/usr/bin$ /usr/bin/vim abc.txt bash: /usr/bin/vim: Too many levels of symbolic links May 11 '13 at 0:07
  • The command does not seem to recognize vim. rahul@hpdv6:/usr/bin$ sudo update-alternatives --config editor There are 2 choices for the alternative editor (providing /usr/bin/editor). Selection Path Priority Status ------------------------------------------------------------ * 0 /bin/nano 40 auto mode 1 /bin/ed -100 manual mode 2 /bin/nano 40 manual mode Press enter to keep the current choice[*], or type selection number: May 11 '13 at 0:11
  • I just did a sudo apt-get install linux-doc and that seems to work. May 11 '13 at 0:26
1

Vim should be installed by default on all machines. As well, that command should work just fine. You may want to try these:

sudo apt-get install vim-tiny

for the command line mode or:

sudo apt-get install vim-gnome

for the full GUI edition.

3
  • Hi llamositopia, I have tried all possible alternatives. It does not seem to work. May 10 '13 at 23:39
  • Have you tried using sudo apt-get remove vim followed by sudo apt-get install vim it may be a problem with the current installation not showing up. May 11 '13 at 0:01
  • I did that too. Infact, I believe I am having the same problem with the g++ package. May 11 '13 at 0:02
0

You must not have the source enabled. This link will open it in the software center: http://apt.ubuntu.com/p/vim

If you need to enable the source it will give you a button

It shows up for me.

12
  • Hi GM-Script-Writer-62850, I understand that it should show up, but it doesn't. May 10 '13 at 23:39
  • can you post your /etc/apt/sources.list file? tried running sudo apt-get update? May 11 '13 at 0:18
  • I get the following message when I run the former: rahul@hpdv6:/usr/bin$ sudo /etc/apt/sources.list sudo: /etc/apt/sources.list: command not found May 11 '13 at 0:27
  • Yes, I tried running sudo apt-get update. May 11 '13 at 0:27
  • cat /etc/apt/sources.list it is not a script is a config file May 11 '13 at 1:01
0

What does apt-cache search ^vim show?

What happens if you run /usr/bin/vim abc.txt ?

I'm guessing you or someone did something odd with the system (installs or package removals, or file deletion).

Try
sudo update-alternatives --config editor

If that doesn't work, are you able to install any other packages? E.g., sudo apt-get install tidy or anything else?

Try the steps in this answer .

2
  • I just tried sudo apt-get install linux-doc, and that worked fine. I think I have probably done something funny. May 11 '13 at 0:46
  • Yeah, I'm concerned that you might have gotten other things deleted or moved around. You might post the contents of your /etc/apt/sources.list file to see if there's anything odd there.
    – belacqua
    May 11 '13 at 1:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.