nb icon indicating copy to clipboard operation
nb copied to clipboard

ARM Installation Fails/Dependency on Ubuntu

Open heywoodlh opened this issue 3 years ago • 5 comments

When attempting to run nb env install on ARM there is a hardcoded reference to amd64 and so nb env install attempts to install an x86_64 bit package on ARM, which fails.

It seems this is the function that is causing the issue:

  _env_install_deb() {
...
    local _deb_filename="${_name}_${_version}_amd64.deb"
...

Also, it seems that there is a dependency on Ubuntu's versioning to check for apt packages installed which is why the ARM installation fails because it doesn't even try to look for ripgrep already installed via apt:

if [[ "$(_env_max_version "${_os_version}" "18.10")" == "${_os_version}" ]]

I would suggest checking for something that will be present on any Debian derivative (Debian, Raspberry Pi OS, Ubuntu, etc.) such as /etc/debian_version. I would just change the check to see if that file exists and if it does, proceed with the install via apt instead of trying to download the .deb file.

Hope this feedback helps. I'd be happy to submit a pull request with the proposed changes should you let me know how you'd like to proceed.

heywoodlh avatar Oct 07 '20 18:10 heywoodlh

Thanks! This helps a lot. Yeah, a pull request would be great, otherwise I can look into it.

xwmx avatar Oct 07 '20 19:10 xwmx

Per commit dc2a6d26429e514d78281c53e4b4d5365026c65c (in my pending pull request) I believe I have solved this issue.

heywoodlh avatar Oct 07 '20 23:10 heywoodlh

These changes are available as of 5.7.0. I don't have an easy way to test this that I'm aware of.

xwmx avatar Oct 17 '20 19:10 xwmx

Possibly related, a sudo make install in a cloned nb repo on Raspberry Pi OS (bullseye) succeeded with one exception. It failed to install ripgrep with the following message:

! Please install ripgrep manually. No .deb package available for armv7l.--2022-10-12 09:50:41--

I was able to successfully install ripgrep afterwards with a simple sudo apt install ripgrep. I think nb is hardcoding the architecture to armv7l while the package in the repository is armhf. Just guessing, I did not take a look yet.

At any rate, nb installs complete with supporting packages on Raspberry Pi OS looks close to fully supported.

doctorfree avatar Oct 12 '22 17:10 doctorfree

@doctorfree Thanks for the heads up. It looks like the apt package detection pattern wasn't matching available packages. It's updated in the latest version of the repo.

xwmx avatar Oct 13 '22 04:10 xwmx