Skip to content

Instantly share code, notes, and snippets.

Last active June 8, 2023 07:49
  • Star 68 You must be signed in to star a gist
  • Fork 33 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Installing vim 7.4 with lua on Ubuntu 12.04
sudo apt-get remove --purge vim vim-runtime vim-gnome vim-tiny vim-common vim-gui-common
sudo apt-get build-dep vim-gnome
sudo apt-get install liblua5.1-dev luajit libluajit-5.1 python-dev ruby-dev libperl-dev libncurses5-dev libgnome2-dev libgnomeui-dev libgtk2.0-dev libatk1.0-dev libbonoboui2-dev libcairo2-dev libx11-dev libxpm-dev libxt-dev
sudo rm -rf /usr/local/share/vim
sudo rm /usr/bin/vim
sudo mkdir /usr/include/lua5.1/include
sudo mv /usr/include/lua5.1/*.h /usr/include/lua5.1/include/
sudo ln -s /usr/bin/luajit-2.0.0-beta9 /usr/bin/luajit
cd ~
git clone
cd vim/src
make distclean
./configure --with-features=huge \
--enable-rubyinterp \
--enable-largefile \
--disable-netbeans \
--enable-pythoninterp \
--with-python-config-dir=/usr/lib/python2.7/config \
--enable-perlinterp \
--enable-luainterp \
--with-luajit \
--enable-gui=auto \
--enable-fail-if-missing \
--with-lua-prefix=/usr/include/lua5.1 \
sudo make install
Copy link

Fansion commented Dec 4, 2014

it worked finally, although I am not totally clear the reason, thx so much :)

Copy link

ghost commented Jan 28, 2015

I did it with dpkg-buildpackage on Ubuntu 14.04.
My goal was to install vim with lua support in order to use neocomplete.

apt-get install liblua5.1-dev luajit libluajit-5.1
apt-get source vim
cd vim-7.4.052
vim debian/rules

Add those flags after "OPTFLAGS+=--with-features=huge"(line 64):
--- cut ---
--- cut ---

Build packages:
dpkg-buildpackage -i -I -j16

Remove old vim:
apt-get remove vim vim-common vim-runtime
[and all other vim-* you have installed]

Install new vim:
dpkg -i vim_7.4.052-1ubuntu3_amd64.deb vim-common_7.4.052-1ubuntu3_amd64.deb vim-runtime_7.4.052-1ubuntu3_all.deb vim-gnome_7.4.052-1ubuntu3_amd64.deb vim-gtk_7.4.052-1ubuntu3_amd64.deb vim-gui-common_7.4.052-1ubuntu3_all.deb

Copy link

The one on the very top worked for my ubuntu 14.04 LTS. The luajit and libluajit-5.1 made the difference. A thank-you to jdewit.

Copy link

Note: Vim has moved off Google Code. If you still want to follow these instructions use the bitbucket target ( instead of the google code when you do the mercurial checkout. details

Copy link

git clone --depth 1

to not have to grab the whole repository.

Copy link

dengdal commented Dec 15, 2015

Thanks for your helpful instructions.
The dpkg-buildpackage method is great, as I don't have to rebuild my VIM on every new machine anymore.

Copy link

Amazing, works perfect on my Ubuntu 14.04, I had errors in this lines:
sudo rm /usr/bin/vim
sudo ln -s /usr/bin/luajit-2.0.0-beta9 /usr/bin/luajit ----> because I already have luajit
None of my plugins or configuration was modified, it's perfect!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment