记录:vim build configure

安装需要的库

sudo apt install -y libncurses5-dev libgnome2-dev libgnomeui-dev \
libgtk2.0-dev libatk1.0-dev libbonoboui2-dev \
libcairo2-dev libx11-dev libxpm-dev libxt-dev python-dev \
 ruby-dev lua5.1 liblua5.1-dev libperl-dev git

支持 lua python python3

./configure --with-features=huge --enable-multibyte \
--enable-python3interp=yes  \
--with-python3-command=python3.8 \
--with-python3-config-dir=/usr/lib/python3.8/config-3.8-x86_64-linux-gnu  \
--enable-luainterp=yes \
--enable-gui=gtk2 \
--enable-cscope \
--enable-fail-if-missing

注:在安装8.2时,如果刚好是python3.8,则会出现如下报错
if_python3.c:69:10: fatal error: Python.h: No such file or directory
这时需要

export CFLAGS="-Iusr/include/python3.8" //注意,有可能你的位置不一样
//然后再运行 
./configure ..........

还需注意:需要 apt install python3.8-dev 要不然仍然会报错


centos 上会有一点点不一样

安装所需的库

yum install python3 -y
yum install python3-devel -y
yum install ncurses-devel.x86_64 -y
./configure --with-features=huge --enable-multibyte \
 --enable-python3interp=yes \
  --with-python3-command=python3.6 \
--with-python3-config-dir=/usr/lib/python3.6/  \
--enable-luainterp=yes --enable-gui=gtk2 --enable-cscope --enable-fail-if-missing

你可能感兴趣的:(记录:vim build configure)