How to use nvim command if neovim is installed using appimage?
Asked Answered
D

3

13

I have installed nvim using AppImage mentioned as below

curl -LO https://github.com/neovim/neovim/releases/download/nightly/nvim.appimage
chmod u+x nvim.appimage
./nvim.appimage

if i use nvim test,yml ,it fails as '-bash: /usr/bin/nvim: No such file or directory'

if i use ./nvim.appimage test.yml then it works. How to map this to nvim so that it works properly?

Daguerre answered 21/10, 2020 at 12:11 Comment(1)
soft link / alias / ... ?Salangi
T
12

Linux looks for binaries in the paths that are set in $PATH variable. To check current paths execute echo $PATH

One way to fix it would be to move nvim.appimage (and rename it to just nvim) to one of the paths set in that variable.

Another way is to append the current path of nvim.appimage to $PATH. This was answered in detail How to correctly add a path to PATH?

Tennietenniel answered 21/10, 2020 at 12:21 Comment(0)
P
5

Move it into /usr/local/bin/nvim

sudo mv nvim.appimage /usr/local/bin/nvim
Pageantry answered 19/8, 2023 at 4:3 Comment(2)
This is already what’s the accepted answer is advising.Readytowear
One thing to point here, is that u need fuse on ubuntu/wsl2 too. Without it, I u need to executre --appimage-extract flag all the time.Ipoh
T
0
wget https://github.com/neovim/neovim/releases/download/v0.10.1/nvim.appimage

chmod +x nvim.appimage
./nvim.appimage --appimage-extract
#you can use mc to go faster
sudo mv ./squashfs-root/usr/bin/nvim /usr/local/bin/nvim
sudo mv ./squashfs-root/usr/lib/nvimcd .. /usr/local/lib/nvim
# move all from share to /usr/local/share/
sudo mv ./squashfs-root/usr/share/* /usr/local/share/
rm -rf nvim.appimage
rm -rf squashfs-root

# on error  sudo apt install build-essential
Tripod answered 2/8, 2024 at 19:20 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.