卸载低版本
yum remove vim
vim8.2文件
命令步骤
# 下载vim8.2文件
[root@myecs ~]# wget https://ftp.nluug.nl/pub/vim/unix/vim-8.2.tar.bz2
# 解压下载的文件
[root@myecs ~]# tar -jxvf vim-8.2.tar.bz2
[root@myecs ~]# ls
vim82 vim-8.2.tar.bz2
[root@myecs ~]# cd vim82/src
[root@myecs src]# ./configure
# 在配置过程(检查依赖关系)可能会碰到下面的问题:
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.
[root@myecs src]# yum install ncurses ncurses-devel
# 编译
[root@myecs src]# make
# 安装
[root@myecs src]# make install
# 提示错误
[root@myecs ~]# vim
-bash: /usr/bin/vim: No such file or directory
[root@myecs ~]# which vim
/usr/local/bin/vim
# 创建软链接
[root@myecs ~]# ln -s /usr/local/bin/vim /usr/bin/vim
成功打开vim