Installing Mercurial and Vim on EC2

Pre-installed vim on EC2 does not have clipboard support. Installing from source.
First, installing mercurial:

sudo yum install mercurial

Then clone vim:

sudo hg clone https://vim.googlecode.com/hg/ vim
cd vim/src
sudo ./configure --with-features=huge --enable-gui=gnome2
sudo make

…bunch of “make” messages follow…
getting an error:

no terminal library found
checking for tgetent()... configure: error: NOT FOUND!
      You need to install a terminal library; for example ncurses.
      Or specify the name of the library with --with-tlib.

solved by:

sudo yum install ncurses-devel

This made vim compile but after checking:

vim --version

I saw:

-clipboard

To recompile with clipboard support I had to install X11 packages:

sudo yum install libSM-devel
sudo yum install libXt-devel

And maybe a couple more (don’t remember). Standard way to check what is missing:

grep X11 auto/config.log

which assumes we are in /src directory
It may also be necessary to remove config.cached file and then do ./configure again:
I did:

sudo ./configure --enable-rubyinterp=dynamic --enable-cscope --enable-gui=auto --enable-gtk2-check --enable-gnome-check --with-features=huge --with-x

Finally it worked and I saw nice “+clipboard” :). Also I need to add -X option when ssh

ssh -X  

Now copying into register “+” in vim finally works and content is available in system clipboard 🙂

Advertisements
This entry was posted in EC2, Vim and tagged , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s