ubuntu 源码编译安装最新的vim 8.0
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ubuntu 源码编译安装最新的vim 8.0相关的知识,希望对你有一定的参考价值。
为什么要源码编译安装VIM?
因为我要安装ycm,ycm要求vim版本为8.0
教程步骤:
1, 核对系统版本
2, 删除系统自带的vim
3, 编译安装vim
4, 检验vim的安装
1,核对系统版本
[email protected]:~# lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 14.04.5 LTS Release: 14.04 Codename: trusty [email protected]:~#
系统版本不是Ubuntu 14.05的少年,请不要往下看了
2,删除系统自带的vim
查看当前vim编辑器版本 [email protected]:~# which vim /usr/bin/vim [email protected]:~# vim --version VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Nov 24 2016 16:43:18) 删除系统的vim [email protected]:~# apt-get autoremove vim 验证vim是否删除 [email protected]:~# vim bash: /usr/bin/vim: 没有那个文件或目录 [email protected]:~# which vim [email protected]:~#
3,编译安装vim
解决依赖 python 开发库 [email protected]:~# apt-get install python-dev 下载vim源代码 [email protected]:~# wget https://codeload.github.com/vim/vim/zip/master [email protected]:~# unzip master [email protected]:~# cd vim-master/ 开始configure [email protected]:~/vim-master# ./configure --enable-pythoninterp=yes -with-python-config-dir=/usr/lib/python2.7/config-x86_64-linux-gnu/ 报错提示: 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. 解决: [email protected]:~/vim-master# apt-get install -y libncurses5-dev 继续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 编译: [email protected]:~/vim-master# make -j 8 [email protected]:~/vim-master# echo $? 0 安装vim [email protected]:~/vim-master# make install [email protected]:~/vim-master# echo $? 0
4, 检验vim的安装
[email protected]:~/vim-master# vim bash: /usr/bin/vim: 没有那个文件或目录 [email protected]:~/vim-master# which vim /usr/local/bin/vim 创建软链接 [email protected]:~/vim-master# ln -s /usr/local/bin/vim /usr/bin/vim 验证版本 [email protected]:~/vim-master# vim --version VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Mar 4 2017 15:12:25) 包含补丁: 1-329 编译者 [email protected] 验证vim-python插件 [email protected]:~/vim-master# vim --version | grep python +cryptv +linebreak +python +vreplace +cscope +lispindent -python3 +wildignore
到此VIM 8.0安装成功!
本文出自 “魂斗罗” 博客,请务必保留此出处http://990487026.blog.51cto.com/10133282/1903196
以上是关于ubuntu 源码编译安装最新的vim 8.0的主要内容,如果未能解决你的问题,请参考以下文章