ubuntu14.04编译vim8.1
安装依赖
这一步其实我没做,直接下载编译成功了。估计有些包不是必需的。姑且列在这里供参考
sudo apt 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 lua5.1 liblua5.1-dev libperl-dev git
下载源码
git clone https://github.com/vim/vim.git
编译安装
由于我希望能在无sudo权限机器,所以决定安装到~/usr目录下。这个可以通过 --prefix指定
cd vim make distclean ./configure --enable-cscope --enable-largefile --enable-multibyte --enable-mzschemeinterp --enable-xim --enable-perlinterp=yes --enable-python3interp=yes --enable-luainterp=yes --enable-gui=no --enable-fontset --enable-terminal --with-features=huge --with-x --with-compiledby="zhuangqiubin" --with-python3-config-dir=/usr/lib/python3.7/config-$(uname -m)-linux-gnu --prefix=/home/zhuangqiubin/usr make VIMRUNTIMEDIR=/home/zhuangqiubin/usr/share/vim/vim81 -j4 make install
使用新的vim
安装后的vim在
/home/zhuangqiubin/usr/bin/vim
配置下环境变量的PATH,即在~/.bashrc中添加一行
export PATH="$HOME/usr/bin:$PATH"
后续即可优先使用这个新的vim
参考
本文参考了
https://www.cnblogs.com/JoiT/p/build_from_source_for_linux_vim.html
相关推荐
jiangtie 2020-08-15
杨立峰 2020-07-18
linjava 2020-06-14
secondid 2020-06-06
昭君出塞 2020-06-03
jackadmi 2020-06-03
xushxbigbear微信 2020-05-16
chenchuang 2020-05-10
89467505 2020-05-08
sunln00 2020-05-07
youandme 2020-05-06
playis 2020-05-04
ningningmingming 2020-05-01
LychieFan 2020-04-30
spartmap 2020-04-20
咏月东南 2020-04-20
jeonkc 2020-04-19