Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't install Node v18 on Raspberry Pi #3175

Closed
zaiff5091 opened this issue Aug 25, 2023 · 5 comments
Closed

Can't install Node v18 on Raspberry Pi #3175

zaiff5091 opened this issue Aug 25, 2023 · 5 comments

Comments

@zaiff5091
Copy link

zaiff5091 commented Aug 25, 2023

Hello,

Sorry in advance for the bad use of the form, I'm new with everything around nvm. I did a fresh install on my raspberry pi and got this. Do you know what could be the origin of the problem ? If there are informations missing don't hesitate to tell me and I will add.

Operating system and version:

System : Raspberry Pi Zero W
OS : Raspberry Pi OS, release of May 3rd 2023

nvm debug output:

nvm --version: v0.39.4
$SHELL: /bin/bash
$SHLVL: 1
whoami: 'pi'
${HOME}: /home/pi
${NVM_DIR}: '${HOME}/.nvm'
${PATH}: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games
$PREFIX: ''
${NPM_CONFIG_PREFIX}: ''
$NVM_NODEJS_ORG_MIRROR: ''
$NVM_IOJS_ORG_MIRROR: ''
shell version: 'GNU bash, version 5.1.4(1)-release (arm-unknown-linux-gnueabihf)'
uname -a: 'Linux 6.1.21+ #1642 Mon Apr 3 17:19:14 BST 2023 armv6l GNU/Linux'
checksum binary: 'sha256sum'
OS version: Raspbian GNU/Linux 11  
random-funcs:       srandom/random
regex-funcs:        internal
compiled limits:
sprintf buffer      8192
maximum-integer     2147483647
awk: /usr/bin/awk, mawk 1.3.4 20200120
curl: /usr/bin/curl, curl 7.74.0 (arm-unknown-linux-gnueabihf) libcurl/7.74.0 OpenSSL/1.1.1n zlib/1.2.11 brotli/1.0.9 libidn2/2.3.0 libpsl/0.21.0 (+libidn2/2.3.0) libssh2/1.9.0 nghttp2/1.43.0 librtmp/2.3
wget: /usr/bin/wget, GNU Wget 1.21 built on linux-gnueabihf.
git: /usr/bin/git, git version 2.30.2
grep: /usr/bin/grep (grep --color=auto), grep (GNU grep) 3.6
sed: /usr/bin/sed, sed (GNU sed) 4.7
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 (GNU findutils) 4.8.0
nvm current: none
which node: 
which iojs: 
which npm: 
npm config get prefix: -bash: npm: command not found
npm root -g: -bash: npm: command not found

nvm ls output:

            N/A
iojs -> N/A (default)
node -> stable (-> N/A) (default)
unstable -> N/A (default)
lts/* -> lts/hydrogen (-> N/A)
lts/argon -> v4.9.1 (-> N/A)
lts/boron -> v6.17.1 (-> N/A)
lts/carbon -> v8.17.0 (-> N/A)
lts/dubnium -> v10.24.1 (-> N/A)
lts/erbium -> v12.22.12 (-> N/A)
lts/fermium -> v14.21.3 (-> N/A)
lts/gallium -> v16.20.2 (-> N/A)
lts/hydrogen -> v18.17.1 (-> N/A)

How did you install nvm?

wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.4/install.sh | bash

What steps did you perform?

nvm install lts/hydrogen

What happened?

Take around 1 hour to proceed and this is what I get at the end :

cc: fatal error: Processus arrêté signal terminated program cc1
compilation terminated.
make[1]: *** [tools/icu/icudata.target.mk:157 : /home/nico/.nvm/.cache/src/node-v18.17.1/files/out/Release/obj.target/icudata/gen/icudt73_dat.o] Erreur 1
make: *** [Makefile:134 : node] Erreur 2
nvm: install v18.17.1 failed!

What did you expect to happen?

No error when installing v18.17.1.

Is there anything in any of your profile files that modifies the PATH?

No.

If you are having installation issues, or getting "N/A", what does curl -I --compressed -v https://nodejs.org/dist/ print out?

*   Trying 2606:4700:10::6814:172e:443...
* Connected to nodejs.org (2606:4700:10::6814:172e) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
*  CAfile: /etc/ssl/certs/ca-certificates.crt
*  CApath: /etc/ssl/certs
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
* TLSv1.3 (IN), TLS handshake, Certificate (11):
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
* TLSv1.3 (IN), TLS handshake, Finished (20):
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.3 (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
* ALPN, server accepted to use h2
* Server certificate:
*  subject: CN=*.nodejs.org
*  start date: Feb  3 00:00:00 2023 GMT
*  expire date: Mar  5 23:59:59 2024 GMT
*  subjectAltName: host "nodejs.org" matched cert's "nodejs.org"
*  issuer: C=GB; ST=Greater Manchester; L=Salford; O=Sectigo Limited; CN=Sectigo RSA Domain Validation Secure Server CA
*  SSL certificate verify ok.
* Using HTTP2, server supports multi-use
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* Using Stream ID: 1 (easy handle 0x1bfcf88)
> HEAD /dist/ HTTP/2
> Host: nodejs.org
> user-agent: curl/7.74.0
> accept: */*
> accept-encoding: deflate, gzip, br
> 
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* old SSL session ID is stale, removing
* Connection state changed (MAX_CONCURRENT_STREAMS == 256)!
< HTTP/2 200 
HTTP/2 200 
< date: Sat, 26 Aug 2023 14:04:42 GMT
date: Sat, 26 Aug 2023 14:04:42 GMT
< content-type: text/html
content-type: text/html
< cache-control: public, max-age=3600, s-maxage=14400
cache-control: public, max-age=3600, s-maxage=14400
< last-modified: Sat, 26 Aug 2023 13:35:11 GMT
last-modified: Sat, 26 Aug 2023 13:35:11 GMT
< cf-cache-status: HIT
cf-cache-status: HIT
< age: 1695
age: 1695
< vary: Accept-Encoding
vary: Accept-Encoding
< strict-transport-security: max-age=31536000; includeSubDomains; preload
strict-transport-security: max-age=31536000; includeSubDomains; preload
< x-content-type-options: nosniff
x-content-type-options: nosniff
< server: cloudflare
server: cloudflare
< cf-ray: 7fcca01de8db2a14-CDG
cf-ray: 7fcca01de8db2a14-CDG
< content-encoding: br
content-encoding: br

< 
* Connection #0 to host nodejs.org left intact
@ljharb
Copy link
Member

ljharb commented Aug 26, 2023

Can you please fill out the entire issue template? It's there for a reason.

@zaiff5091
Copy link
Author

It's updated.

@ljharb
Copy link
Member

ljharb commented Aug 26, 2023

Thanks.

hmm, I’m not entirely sure - it looks like it’s failing the compile process, though, which is all managed by node itself. Can you try installing node 16, 20, etc and see if any of them complete? Also, can you confirm there’s enough disk space?

@Ostabo
Copy link

Ostabo commented Aug 27, 2023

I'd suggest using the unofficial-builds.nodejs.org mirror as explained here for a Pi Zero W

So for node 18.x:

NVM_NODEJS_ORG_MIRROR=https://unofficial-builds.nodejs.org/download/release/ nvm install 18

@zaiff5091
Copy link
Author

Thanks @Ostabo !! It worked.

Thank you guys for your help.

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

No branches or pull requests

3 participants