Why do I need to compile and install vim?
Because I want to install YCM,YCM requires a vim version of 8.0
Tutorial steps:
1, check the system version
2. Remove the vim that comes with the system
3, compile and install vim
4, test the installation of VIM
1, check the system version
[Email protected]:~# Lsb_release-ano LSB modules is available. Distributor ID:UbuntuDescription:Ubuntu 14.04.5 Ltsrelease:14.04codename:trusty[email protected]:~#
The system version is not the Ubuntu 14.05 teenager, please don't look down
2. Remove the vim that comes with the system
View current VIM editor version [email protected]:~# which vim/usr/bin/vim[email protected]:~# vim--versionvim-vi improved 7.4 (10 , compiled 24 2016 16:43:18) Delete the system's Vim[email protected]:~# apt-get autoremove vim to verify that vim is removed [email protected]:~# vimbash: /usr/bin/vim: No file or directory [email protected]:~# which vim[email protected]:~#
3, compile and install vim
Resolve Dependencies python Development library [EMAIL PROTECTED]:~# APT-GET INSTALL PYTHON-DEV download vim source code [email protected]:~# wget https://codeload.github.com/vim/vim/zip/master[email protected]:~# unzip master [email protected]:~# cd vim-master/Start configure [email Protected]:~/vim-master# ./configure --enable-pythoninterp=yes -with-python-config-dir=/usr/lib /python2.7/config-x86_64-linux-gnu/error Hint: no terminal library foundchecking 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. Resolution: [ Email protected]:~/vim-master# apt-get install -y libncurses5-dev Continue Configure:[email protected]:~/vim-master# ./configure --enable-pythoninterp=yes -with-python-config-dir=/usr/lib/python2.7/ config-x86_64-linux-gnu/[email protected]:~/vim-master# echo $?0 compilation: [email protected]:~/ Vim-master# make -j 8[email protected]:~/vim-master# echo $?0 installation vim[email Protected]:~/vim-master# make install [email protected]:~/vim-master# echo $?0
4, test the installation of VIM
[email protected]:~/vim-master# vimbash: /usr/bin/vim: does not have that file or directory [email protected]:~/ Vim-master# which vim/usr/local/bin/vim Creating a soft link [email protected]:~/vim-master# ln -s /usr/local/bin/vim /usr/bin/vim Verify Version [Email protected]:~/vim-master# vim --versionvim - Vi IMproved 8.0 (2016 sep 12, compiled mar 4 2017 15:12:25) contains patch: 1-329 compiler [email protected] Validate Vim-python plugin [email protected]:~/ vim-master# vim --version | grep python+cryptv +linebreak +python +vreplace+cscope +lispindent -python3 +wildignore
650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M02/8E/40/wKioL1i6bOTAfN0CAABgg5w70Us514.png "title=" Vim-001.png "alt=" Wkiol1i6botafn0caabgg5w70us514.png "/>
To this VIM 8.0 installation succeeded!
This article is from the "Soul Bucket" blog, please be sure to keep this source http://990487026.blog.51cto.com/10133282/1903196
Ubuntu Source compilation installs the latest Vim 8.0