TurnKey Linux Virtual Appliance Library

Howto update VIM on Turnkey appliance for development?

Stephen Weber's picture

I do a lot of development with Turnkey appliances inside VirtualBox virtual machines. I really ought to edit the code in normal-space since I've tuned many of my development tools the way I want them, but today I was being lazy and working on a Django appliance.

Using VIM I kept getting frustrated by little things: no syntax highlighting, couldn't switch between buffers... I kept getting the error "E319: Sorry, the command is not available in this version". I noticed that the install only had vim-tiny, which takes up a lot less space so it makes sense for Turnkey to assume the appliance is a production environment.

So the man pages suggest installing vim-runtime, so I did. Still got the E319 errors for the features I wanted. On a whim I decided to update and upgrade (erroneously thinking I was upgrading vim-common) and this yielded no change.

Basically, VIM is the wrong version to do what I want it to do. Other than compiling it from source, what options do I have?

Alon Swartz's picture

just install the vim package?

As you mentioned, the appliances include vimtiny to save space, as well as letting the user choose his preferred editor as needed.

You can install the full version of vim like this:
apt-get update
apt-get install vim
And turn on syntax highlighting like this:
:syntax on
Hope this helps.

Vim package has unmet dependencies

When I run apt-get install vim, I get the following message:

The following packages have unmet dependencies:
  vim: Depends: vim-common (= 1:7.1-138+1ubuntu3.1) but 1:7.1.293-2ubuntu1 is to be installed
 

Yeah I'm getting the same

Yeah I'm getting the same thing. It's really annoying. Did anyone figure this out or is it just a bug in the release?

Okay I just had to do apt-get

Okay I just had to do apt-get remove vim-common and then do apt-get install vim and everything worked great.

vim: Sorry, the command is not available in this version

 

I kept getting the error "Sorry, the command is not available in this version" no matter how I uninstalled and reinstalled.  Eventually, I noticed that vim would open even when it claimed to be uninstalled.
 
A 'which vim' caused me to notice a symlink in '/usr/local/bin' pointed at '/usr/bin/vim.tiny'.  
 
I renamed that link 'vim.tiny' by typing:
mv /usr/local/bin/vim /usr/local/bin/vim.tiny
 
I made a new symlink for vim: 
ln -s /usr/bin/vim /usr/local/bin/vim
 
And all of my wonderful plugins began working again.  :D

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <p> <span> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area> <hr> <br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> <b> <u> <i> <strong> <font> <del> <ins> <sub> <sup> <quote> <blockquote> <pre> <address> <code> <cite> <strike> <caption>

More information about formatting options

Leave this field empty. It's part of a security mechanism.
(Dear spammers: moderators are notified of all new posts. Spam is deleted immediately)