-
-
Save ldesiqueira/f1d4e37c615cf1b6de98b239bcba88e9 to your computer and use it in GitHub Desktop.
Compile the latest Vim 7.4 on CentOS 7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Compile the latest Vim 7.4 on CentOS 7 | |
# yum install gcc make ncurses ncurses-devel | |
# yum install ruby ruby-devel lua lua-devel luajit \ | |
luajit-devel ctags git python python-devel \ | |
python3 python3-devel tcl-devel \ | |
perl perl-devel perl-ExtUtils-ParseXS \ | |
perl-ExtUtils-XSpp perl-ExtUtils-CBuilder \ | |
perl-ExtUtils-Embed | |
or | |
# yum clean all | |
# yum grouplist | |
# yum groupinfo "Development Tools" | |
# yum groupinstall "Development tools" | |
# yum install ncurses ncurses-devel | |
// For debian/Ubuntu users: | |
# apt-get install libncurses5-dev libgnome2-dev libgnomeui-dev \ | |
libgtk2.0-dev libatk1.0-dev libbonoboui2-dev \ | |
libcairo2-dev libx11-dev libxpm-dev libxt-dev python-dev \ | |
python3-dev ruby-dev git | |
If you want to install the optional packages With yum groupinstall command: | |
# vim /etc/yum.conf | |
group_package_types=default, mandatory, optional | |
Note: the default setting is default, mandatory. | |
Remove the existing vim if you have already installed it: | |
# yum list installed | grep -i vim | |
vim-common.x86_64 2:7.4.160-1.el7 @base | |
vim-enhanced.x86_64 2:7.4.160-1.el7 @base | |
vim-filesystem.x86_64 2:7.4.160-1.el7 @base | |
vim-minimal.x86_64 2:7.4.160-1.el7 @anaconda | |
# yum remove vim-enhanced vim-common vim-filesystem | |
Note: You do not need to remove vim-minimal because sudo depends on it. | |
Build vim: | |
# cd /usr/local/src | |
Download vim source (it is better to get it from GitHub because you can get all the latest patches from there): | |
# git clone https://github.com/vim/vim.git | |
# cd vim | |
or | |
# wget ftp://ftp.vim.org/pub/vim/unix/vim-7.4.tar.bz2 | |
# tar -xjf vim-7.4.tar.bz2 | |
# cd vim74 | |
Show the configuration options: | |
# ./configure --help | |
Configure: | |
# ./configure --prefix=/usr --with-features=huge --enable-multibyte --enable-rubyinterp --enable-pythoninterp --enable-perlinterp --enable-luainterp | |
Build: | |
# make | |
or | |
# make VIMRUNTIMEDIR=/usr/share/vim/vim74 | |
# make install | |
re-hash the environment: | |
# hash -r | |
Check vim version: | |
# vim --version | less | |
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Jul 24 2016 14:27:26) | |
Included patches: 1-2102 | |
... | |
+lua +multi_byte +perl +python +ruby | |
Check vim patches: | |
# vim | |
:echo has("patch-7.4-2102") | |
1 | |
Reference: | |
https://github.com/Valloric/YouCompleteMe/wiki/Building-Vim-from-source | |
https://gist.github.com/holguinj/11064609 | |
http://www.fullybaked.co.uk/articles/installing-latest-vim-on-centos-from-source |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment