Skip to content

Conversation

@EvanCarroll
Copy link
Contributor

@EvanCarroll EvanCarroll commented Apr 18, 2024

Attempted fix for #859, provide reasonable Debian install instructions -- comment on GitHub issue with refinement.

Attempted fix for nvim-lua#859, provide reasonable Debian install instructions -- comment on GitHub issue with refinement.
# Now we install nvim
curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim-linux64.tar.gz
sudo rm -rf /opt/nvim
sudo tar -C /opt -xzf nvim-linux64.tar.gz
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when testing this I noticed that /opt/nvim-linux64 was inaccessible to my user because of umask 027 and the nvim-linux64 itself is not in the archive so tar would not set it's permissions, so perhaps this needs to be added:

sudo mkdir -p /opt/nvim-linux64
sudo chmod a+rx /opt/nvim-linux64

Copy link
Contributor Author

@EvanCarroll EvanCarroll Apr 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or just put it in a subshell (umask 022; sudo tar...) , i mean it's not a hard workaround but you're going to be changing every guide online for it.

if you set 0277 you don't want things installed as root run by non-root, that's what you're saying. some people like that. if so, you could install it to ~/opt/ and symlink to ~/.bin/ rather than /usr/local/bin.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's not what I'm saying, a user having a umask 027 intention is that the user's files are not readable by other users by default. I think that's not an uncommon setting. That doesn't translate to the intention of root installed packages not being able to be used by users. If the /opt/nvim-linux64 was a part of the tar package this would not be an issue because tar will preserve permissions but it is not, only the subdirs are part of the tar package.
Anyway, this is just a suggestion to make it less error prone for a wider audience, feel free to ignore it and resolve this comment if you think the current behaviour is preferred.

sudo apt install -t unstable neovim
# Now we install nvim
curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim-linux64.tar.gz
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On a fresh debian install I get an error that curl is not installed:

vboxuser@debian125:~$ curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim-linux64.tar.gz
bash: curl: command not found

so please add also curl to the above list of dependencies:

sudo apt install make gcc ripgrep unzip git curl

Copy link
Contributor

@dam9000 dam9000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@feoh let's merge this, my comments can be addressed later.

@feoh feoh merged commit 931ec5c into nvim-lua:master Apr 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants