前言:
由于公司部分人需要用到vim8,但是我并未完美的了解到vim8具体作用,大概看了一下资讯,好像可以和python3联动,仅此记录一下~~
PPA方式安装:
#添加ppa地址 sudo add-apt-repository ppa:jonathonf/vim #更新apt源 sudo apt update #安装vim8.x sudo apt install vim ------------------------------------------------------- #移除PPA方法 add-apt-repository --remove ppa:jonathonf/vim
报错:
root@localhost :~# add-apt-repository ppa:jonathonf/vim -bash: add-apt-repository: command not found
原因:由于ubuntu缺少了add-apt-repository,所以我们安装software-properties-common包来进行安装
解决方案:
#安装software-properties-common apt-get install software-properties-common -y
APT源安装
原因:由于第一种方式可能会失效,我今天使用PPA方案安装的时候一直提示如下代码,所以我找到了PPA库,里面既然有APT源的方式,进行安装是正常的,所以我推荐使用下面这种方式,其次就是由于编译安装的话,由于你可能python环境发生了改变,你并不知道如何更改,之所以我为什么写出来,原因也是因为这个比较方便快捷。
PPA源报错:
root@-D0:~# apt update -y Hit:1 http://mirrors.aliyun.com/ubuntu xenial InRelease Hit:2 http://mirrors.aliyun.com/ubuntu xenial-updates InRelease Hit:3 http://mirrors.aliyun.com/ubuntu xenial-security InRelease Hit:4 http://packages.microsoft.com/repos/code stable InRelease Hit:5 http://ppa.launchpad.net/gnome-terminator/ppa/ubuntu xenial InRelease Ign:6 https://www.scootersoftware.com bcompare4 InRelease Ign:7 http://ppa.launchpad.net/jonathonf/vim/ubuntu kinetic InRelease Hit:8 https://www.scootersoftware.com bcompare4 Release Err:10 http://ppa.launchpad.net/jonathonf/vim/ubuntu kinetic Release 404 Not Found [IP: 185.125.190.52 80] Reading package lists... Done E: The repository 'http://ppa.launchpad.net/jonathonf/vim/ubuntu kinetic Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details.
添加APT源并更新和安装
#添加APT源 echo 'deb https://ppa.launchpadcontent.net/jonathonf/vim/ubuntu xenial main' >> /etc/apt/sources.list echo 'deb-src https://ppa.launchpadcontent.net/jonathonf/vim/ubuntu xenial main' >> /etc/apt/sources.list #更新APT源 apt-get update #安装vim apt-get install vim
确认安装版本是否正确
root@-D0:/etc/apt# vim --version VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Feb 21 2021 21:10:48) Included patches: 1-2539 Modified by jonathon.fernyhough@york.ac.uk Compiled by jonathon.fernyhough@york.ac.uk
PPA库官方链接



