自己编译,大概率不成功,因为编译过程会总从github上下载文件,网络不佳
# 安装编译依赖
sudo apt-get install libtool libtool-bin autoconf automake cmake g++ pkg-config unzip -y
# 获取源代码
git clone https://github.com/neovim/neovim
cd neovim
make
sudo make install
# 让neovim支持python和python3
sudo apt-get install python3 python3-pip python-pip -y
pip install neovim
pip3 install neovim
PPA方式安装
Before 18.04 Neovim has been added to a "Personal Package Archive" (PPA). This allows you to install it with apt-get
. Follow the links to the PPAs to see which versions of Ubuntu are currently available via the PPA. Choose stable or unstable:
- https://launchpad.net/~neovim-ppa/+archive/ubuntu/stable (Xenial 16.04 or newer only).
- https://launchpad.net/~neovim-ppa/+archive/ubuntu/unstable
To be able to use add-apt-repository you may need to install software-properties-common:
sudo apt-get install software-properties-common
If you're using an older version Ubuntu you must use:
sudo apt-get install python-software-properties
Run the following commands:
sudo add-apt-repository ppa:neovim-ppa/stable
sudo apt-get update
sudo apt-get install neovim
Prerequisites for the Python modules:
sudo apt-get install python-dev python-pip python3-dev python3-pip