0

I am facing some build errors in building Neovim from source in Debian (MxLinux). I tried the package installer and was able to install Neovim, but it is an older version. So, I installed all dependencies as mentioned on the wiki https://github.com/neovim/neovim/wiki/Building-Neovim#build-prerequisite

The ninja and cmake among dependencies I installed from pip3 with the --user option, to avail a more updated version than the apt repository.

The sudo make install ran into error first

cmake -G 'Unix Makefiles'   \
     $HOME/neovim//third-party
/bin/sh: 2: cmake: not found

So, I installed the cmake from apt. The error ceased but a new error crept in

Traceback (most recent call last):
    File "$HOME/.local/bin/ninja", line 5, in <module>
      from ninja import ninja

  ModuleNotFoundError: No module named 'ninja'

I have ninja-build installed from apt. I also have ninja from pip3 at the $PATH.

1

1 Answer 1

0

Ninja was installed on my machine and already in my path in 2 places, I don't know if this was the source of the issue, but I got it working by taking ownership of the system-level python libraries and installation directories:

sudo chown <my username> /usr/local/lib/python* -R

and

sudo chown <my username> /usr/lib/python* -R

-R makes the changes above recursively- effectively changing all child files' and directories' ownership to my user.

I then installed ninja with pip again- which installed it for the whole system:

pip install ninja

Note- you can find your username by using:

whoami
1
  • This seems like a bad idea, generally. Perhaps you needed pip install --user, make sure the corresponding directories are earlier than system dirs on your PATH, and (since this is the second recent question I've seen about NeoVim's build process) make sure the build process correctly accounts for different locations of needed libraries and programs.
    – D. Ben Knoble
    Mar 14, 2023 at 15:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.