Installing Neovim from source
The version of Neovim in the APT repo for Ubuntu 24.04 LTS is 0.9.5. To install the latest stable version (0.11.0 at time of writing), it must be compiled from source.
Installing from source
Install the build dependencies:
sudo apt install build-essential cmake curl gettext ninja-build
Fetch the source code:
git clone https://github.com/neovim/neovim
cd neovim
git switch -d v0.11.0
Compile it with the installation prefix set to ~/.local
(assuming ~/.local/bin
is on your PATH):
make CMAKE_BUILD_TYPE=RelWithDebInfo CMAKE_INSTALL_PREFIX=$HOME/.local
Optionally, run the tests (took ~5 min on my machine):
make test
Install it into ~/.local
:
make install
nvim --version
nvim -c checkhealth
Uninstalling
To later uninstall it, come back to this directory and run:
cmake --build build/ --target uninstall
If the build
subdirectory no longer exists,
it is simpler to just run:
rm ~/.local/bin/nvim
rm -r ~/.local/{lib,share}/nvim/
rm ~/.local/share/**/nvim.*