Centos手动安装Linux Vim8.2最新版教程及问题记录

今天在研究安装YCM插件的时候,遇到了很多问题,其中包括Vim最低要求8.1+版本,服务商提供的源最新只到8.0,所以只能手动安装Vim8.2版本了

1、配置环境

yum install gcc make ncurses ncurses-devel

yum install ctags git tcl-devel \
                ruby ruby-devel \
                lua lua-devel \
                luajit luajit-devel \
                python python-devel \
                perl perl-devel \
                perl-ExtUtils-ParseXS \
                perl-ExtUtils-XSpp \
                perl-ExtUtils-CBuilder \
                perl-ExtUtils-Embed

2、下载源码

sudo git clone https://github.com/vim/vim.git

然后切换到目录vim

cd vim

3、编译配置

./configure --with-features=huge \
--enable-multibyte \
--enable-rubyinterp \
--enable-pythoninterp \
--enable-perlinterp \
--enable-luainterp

按需要进行填写

#configure参数说明:
–with-features=huge:支持最大特性
–enable-rubyinterp:打开对 ruby 编写的插件的支持
–enable-pythoninterp:打开对 python 编写的插件的支持
–enable-python3interp:打开对 python3 编写的插件的支持
–enable-luainterp:打开对 lua 编写的插件的支持
–enable-perlinterp:打开对 perl 编写的插件的支持
–enable-multibyte:打开多字节支持,可以在 Vim 中输入中文
–enable-cscope:打开对 cscope 的支持
–with-python-config-dir=/usr/lib64/python2.7/ 指定 python 路径
–with-python-config-dir=/usr/local/lib/python3.9/ 指定 python3 路径
–prefix=/usr/local/vim:指定VIM将要安装到的路径 (自行创建)
 

4、编译
make

5、安装

make install

这个过程中如果出现问题了,先检查一下环境是否安装好了

然后make clean,make disctclean清除配置重新make进行编译

这里说一个我遇到的错误

checking for tgetent in -lcurses... no
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.

先检查ncurses-devel已经安装好了,但仍然报错,配置失败

ncurses not found when trying to build vim - Stack Overflow

这里有一个帖子,按帖子里的操作

修改配置如下

CFLAGS=-fPIC ./configure --with-tlib=ncurses and your_options

参考资料:GitHub - vim/vim: The official Vim repository

Vim 版本升级(Vim8)_烹茶室的博客-CSDN博客

vim配置python3开发环境_zpsimon的博客-CSDN博客_vim支持python3的配置

  • 2
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值