Open jordyjwilliams opened 1 year ago
Ahhh Sorry! This does seem to duplicate a few issues.
Tried running this through bash
not zsh
and was able to install as expected.
I figured it was something in my PATH
or grep
that was causing the arch/os
versions to not be set correctly...
─❯ nvm install -b node ─╯
Downloading and installing node v19.0.0...
Downloading https://nodejs.org/dist/v19.0.0/.tar.xz... # Incorrectly set here...
curl: (22) The requested URL returned error: 404
Binary download from https://nodejs.org/dist/v19.0.0/.tar.xz failed, trying source.
grep: /home/jordyjwilliams/.config/nvm/.cache/bin//.tar.xz: No such file or directory
To fix this to enable zsh
shell use for nvm
I was able to add the nvm
plugin into the .zshrc
...
Not sure if there are any similar issues to this or how it came about so will leave open in the case someone can better explaini to me....
AFAIK the only things I had modifying my root were miniconda3
and standard oh-my-zsh
setup...
Is there someway to make the output clearer here... As in perhaps a check for the path
.
I am experiencing this on kubuntu 22.04.1 LTS with nvm. Seems to be issue with how it is using curl - the tarball is not being downloaded. I used a workaround by modifying line 120 to force using wget. I changed the line from:
if nvm_has "curl"; then
to
if ! nvm_has "curl"; then
nvm debug output (Without workaround)
$SHELL: /bin/bash
$SHLVL: 1
whoami: 'gargolito'
${HOME}: /home/gargolito
${NVM_DIR}: '${HOME}/.nvm'
${PATH}: ${NVM_DIR}/versions/node/v16.18.0/bin:${HOME}/.pyenv/shims:${HOME}/.pyenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:${HOME}/scripts:${HOME}/bin:${HOME}/build/flutter/bin:${HOME}/build/android-studio/bin:${HOME}/go/bin:/snap/bin
$PREFIX: ''
${NPM_CONFIG_PREFIX}: ''
$NVM_NODEJS_ORG_MIRROR: ''
$NVM_IOJS_ORG_MIRROR: ''
shell version: 'GNU bash, version 5.1.16(1)-release (x86_64-pc-linux-gnu)'
uname -a: 'Linux 5.15.0-50-generic #56-Ubuntu SMP Tue Sep 20 13:23:26 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux'
checksum binary: 'sha256sum'
OS version: Ubuntu 22.04.1 LTS
curl: /usr/bin/curl (curl -s -k -A $UA), curl 7.81.0 (x86_64-pc-linux-gnu) libcurl/7.81.0 OpenSSL/3.0.2 zlib/1.2.11 brotli/1.0.9 zstd/1.4.8 libidn2/2.3.2 libpsl/0.21.0 (+libidn2/2.3.2) libssh/0.9.6/openssl/zlib nghttp2/1.43.0 librtmp/2.3 OpenLDAP/2.5.13
wget: /usr/bin/wget (wget --no-check-certificate), GNU Wget 1.21.2 built on linux-gnu.
git: /usr/bin/git, git version 2.34.1
grep: /usr/bin/grep, grep (GNU grep) 3.7
awk: /usr/bin/awk, GNU Awk 5.1.0, API: 3.0 (GNU MPFR 4.1.0, GNU MP 6.2.1)
sed: /usr/bin/sed, sed (GNU sed) 4.8
cut: /usr/bin/cut, cut (GNU coreutils) 8.32
basename: /usr/bin/basename, basename (GNU coreutils) 8.32
rm: /usr/bin/rm, rm (GNU coreutils) 8.32
mkdir: /usr/bin/mkdir, mkdir (GNU coreutils) 8.32
xargs: /usr/bin/xargs (xargs -L 1), xargs (GNU findutils) 4.8.0
nvm current: v16.18.0
which node: ${NVM_DIR}/versions/node/v16.18.0/bin/node
which iojs:
which npm: ${NVM_DIR}/versions/node/v16.18.0/bin/npm
npm config get prefix: ${NVM_DIR}/versions/node/v16.18.0
npm root -g: ${NVM_DIR}/versions/node/v16.18.0/lib/node_modules
Yeah @gargolito did you try using bash
or another shell and did it work okay for you.
I was able to fix this for myself by editing my settings in my .zshrc
and bashrc
... I think miniconda
and other things modifying my PATH
may have been causing issues...
I think likely some issue with setting the shell version
.... As can be seen in my reply below I did not get the OS version set correctly before these changes. Keeping the issue open for now as I think at least a few others had reported similar behaviour on various linux distros.
Ahhh Sorry! This does seem to duplicate a few issues.
Tried running this through
bash
notzsh
and was able to install as expected.I figured it was something in my
PATH
orgrep
that was causing thearch/os
versions to not be set correctly...─❯ nvm install -b node ─╯ Downloading and installing node v19.0.0... Downloading https://nodejs.org/dist/v19.0.0/.tar.xz... # Incorrectly set here... curl: (22) The requested URL returned error: 404 Binary download from https://nodejs.org/dist/v19.0.0/.tar.xz failed, trying source. grep: /home/jordyjwilliams/.config/nvm/.cache/bin//.tar.xz: No such file or directory
To fix this to enable
zsh
shell use fornvm
I was able to add thenvm
plugin into the.zshrc
...
@gargolito did yours attempt the download at all then try to compile from source? did you get a 404 error too?
@gargolito (curl -s -k -A $UA)
in your nvm debug output is suspicious; mine doesn't have that.
That's my default curl alias. I'll try removing it
On Mon, Oct 24, 2022, 13:51 Jordan Harband @.***> wrote:
@gargolito https://github.com/gargolito (curl -s -k -A $UA) in your nvm debug output is suspicious; mine doesn't have that.
— Reply to this email directly, view it on GitHub https://github.com/nvm-sh/nvm/issues/2923#issuecomment-1289382886, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMREEMTGGAL6ACJIHCANVTWE3EC3ANCNFSM6AAAAAARLUU33Q . You are receiving this because you were mentioned.Message ID: @.***>
@gargolito if removing it fixes it, then a) you can keep those settings in $HOME/.curlrc
without needing the alias, and b) that means there's probably a place that nvm can harden itself against aliases clobbering builtins :-)
This fixed it. Thanks.
On Mon, Oct 24, 2022, 15:56 Jordan Harband @.***> wrote:
@gargolito https://github.com/gargolito if removing it fixes it, then a) you can keep those settings in $HOME/.curlrc without needing the alias, and b) that means there's probably a place that nvm can harden itself against aliases clobbering builtins :-)
— Reply to this email directly, view it on GitHub https://github.com/nvm-sh/nvm/issues/2923#issuecomment-1289527147, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMREEODN3FURM2CMIXT2QDWE3SV5ANCNFSM6AAAAAARLUU33Q . You are receiving this because you were mentioned.Message ID: @.***>
@ljharb any idea on my issue at all as to a possible cause? Any ideas on fixes. I could look into submitting a PR just wandering where to start with this... Where is the URL path specifically set based on os
versions etc
@jordyjwilliams looking at your nvm debug
, what happens if you remove your grep
alias?
@ljharb looking at my zshrc
I didn't have any grep
alias' setup in my config... Not sure where this is coming from?
@jordyjwilliams .zprofile
perhaps?
Even if you can't find the source, you can probably unalias grep
and then run the nvm commands.
How about this: https://github.com/ryenus/nvm/commit/nvm_curl
We can add nvm_curl
and use it to bypass aliased curl, happy to raise a PR if needed.
@ryenus that as a PR would be great! altho i don't think we need nvm_curl
, we can just inline the command
.
Happy to review or try to make the pr whatever easiest
Get Outlook for Androidhttps://aka.ms/AAb9ysg
From: Jordan Harband @.>
Sent: Wednesday, November 2, 2022 3:04:41 PM
To: nvm-sh/nvm @.>
Cc: Jordy Williams @.>; Mention @.>
Subject: Re: [nvm-sh/nvm] nvm install node
will not find/install the binaries on linux
running in ChromeOS
containier. (Issue #2923)
@ryenushttps://github.com/ryenus that as a PR would be great! altho i don't think we need nvm_curl, we can just inline the command.
— Reply to this email directly, view it on GitHubhttps://github.com/nvm-sh/nvm/issues/2923#issuecomment-1299535388, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AKN3GD47TVZNJ37O6AT4P23WGHR5TANCNFSM6AAAAAARLUU33Q. You are receiving this because you were mentioned.Message ID: @.***>
@ryenus that as a PR would be great! altho i don't think we need
nvm_curl
, we can just inline thecommand
.
Sure, here it is: https://github.com/nvm-sh/nvm/pull/2932
IMHO nvm_curl
is a bit more preferable because we can also easily add the -q
option to ignore ~/.curlrc
.
Nevertheless, please feel free to amend.
Operating system and version:
ChromeOS --> Running container of Linux.
nvm debug
output:nvm ls
output:How did you install
nvm
?Install script in
readme
What steps did you perform?
nvm
as per instructions in READMEnvm
working as expectednvm install node
andnvm install --lts
What happened?
What did you expect to happen?
Is there anything in any of your profile files that modifies the
PATH
?miniconda
Gems
If you are having installation issues, or getting "N/A", what does
curl -I --compressed -v https://nodejs.org/dist/
print out?Any help would be much appreciated. Not sure if it's anything with my python envs (conda) setup here,.
Thanks!