Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Install vim with lua support on ubuntu 16.04
I needed to install vim with lua support because I wanted to use neocomplete in my recently installed 15.04 distro. Also, this has python3 enabled by default.
Tested on 16.04 now
Update: This has been tested and verified to work on Ubuntu 16.04 as well. Also, if you wish to use particular branch/tag, you can get the version and then checkout appropriately.
The following (based upon should work though I copied it from history:
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 build-essential liblua5.3-0 liblua5.3-dev 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 /usr/bin/vim /usr/local/bin/vim
sudo mkdir /usr/include/lua5.3/{include,lib}
sudo cp /usr/include/lua5.3/*.h /usr/include/lua5.3/include/
sudo ln -sf /usr/lib/x86_64-linux-gnu/ /usr/include/lua5.3/lib/
sudo ln -sf /usr/lib/x86_64-linux-gnu/liblua5.3.a /usr/include/lua5.3/lib/liblua.a
cd /tmp
git clone
cd vim
git checkout v8.0.0503
make distclean
./configure --with-features=huge \
--enable-rubyinterp \
--enable-largefile \
--disable-netbeans \
--enable-python3interp \
--with-python-config-dir=$(python3-config --configdir) \
--enable-perlinterp \
--enable-luainterp \
--enable-gui=auto \
--enable-fail-if-missing \
--with-lua-prefix=/usr/include/lua5.3 \
--enable-cscope \
sudo make install
Copy link

rainbowbird commented May 20, 2017

@for techgaun, for the python/python3 interpreter support,
--enable-python3interp --with-python3-config-dir=$(python3-config --configdir) \ --enable-pythoninterp --with-python-config-dir=$(python-config --configdir)


Copy link

pitakill commented Oct 12, 2018

I can confirm that this works on xubuntu 18.04


Copy link

ngunyie commented Mar 19, 2019

This also works on WSL, Ubuntu 18.04 but the sudo apt-get build-dep vim-gnome gives an error which you should ignore
and you will need to add this command
sudo apt-get install python3-dev

sudo apt-get build-dep vim-gnome outputs E: You must put some 'source' URIs in your sources.list


Copy link

tomef commented May 15, 2019

If you just want vim with lua support on Ubuntu 18.04, dump the original vim (sudo apt-get purge vim) and sudo apt-get install vim-gtk. Even on a server you still get the non-gui version of vim with lua support when you install the vim-gtk package.


Copy link

holonking commented Sep 3, 2019

worked on wsl ubuntu 18


Copy link

lekodeveloperweb commented Apr 10, 2020

Worked on ubuntu 16.04.6


Copy link

steing commented Apr 18, 2020

sudo apt-get purge vim and sudo apt-get install vim-gtk

worked on WSL ubuntu 18.04


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