asdf-nodejs: Unable to install node >= 18.12.0 versions
I’m using a MacOS M1 and trying to install the 18.12.0 version, but instead I receive an error message that suggests to use the flag --compile
; I tried using the flag, but the error continues.
Trying to update node-build... ok
Downloading node-v18.12.0-darwin-x64.tar.gz...
-> https://nodejs.org/dist/v18.12.0/node-v18.12.0-darwin-x64.tar.gz
error: failed to download node-v18.12.0-darwin-x64.tar.gz
-> https://nodejs.org/dist/v18.12.0/node-v18.12.0-darwin-x64.tar.gz
error: failed to download node-v18.12.0-darwin-x64.tar.gz
BUILD FAILED (OS X 13.2 using node-build 4.9.88-78-g8ead6fb3)
Binary installation failed; try compiling from source with `--compile` flag
Also, reading some issues I tried some commands, like:
arch -x86_64 zsh
and after that ran the installation unsuccessfully.
About this issue
- Original URL
- State: open
- Created a year ago
- Comments: 42 (8 by maintainers)
Hi guys!
I’m facing the same issue here. I was getting the same output of @jtlimo, but installing the current LTS version (18.17.1)
asdf info:
FIX:
It seems the problem is related to
aria2c
, so I removed it from the HTTP clients list in~/.asdf/plugins/nodejs/.node-build/bin/node-build
It just occurs with the LTS version.
The solution from @Matozinho worked for me, but I found that the underlying issue was that
aria2c
was broken, as per this issue. I fixed that by using the solution presented in the linked issue - by updating thegettext
library using homebrew (brew upgrade gettext
). If that works for you then you don’t need to edit the source code anymore, which is preferable.I was having this issue - thought it might be
aria2c
but wasn’t able to find that installed anywhere.If you land here it could be because of IPv6, the network I was on didn’t support it so I had to do:
I’m seeing this as well, not sure if its related exactly, but I run these commands:
There was a problem with intermittent 404s affecting downloads from nodejs, which is hopefully largely resolved:
@Resa-Obamwonyi the above solution by @andycarlberg worked for me
Since this is still a problem in aria2 as @shane-lamb noted, I thought it might be helpful to know there’s an easier way to implement the fix from @Matozinho.
You can use a node-build setting variable to set the
NODE_BUILD_HTTP_CLIENT
before running your command.