distributions icon indicating copy to clipboard operation
distributions copied to clipboard

Unable to install nodejs on Debian and Ubuntu

Open q0rban opened this issue 5 years ago • 19 comments

I am unable to install NodeJS 12 on Debian buster due to unmet dependencies. The specific error is nodejs : Depends: libgcc-s1 (>= 3.4) but it is not installable.

Steps to replicate:

$ docker run debian:buster-slim bash -c 'apt-get update && apt-get -y install curl && curl -fsSL https://deb.nodesource.com/setup_12.x | bash - && apt-get -y install nodejs'

...
## Confirming "buster" is supported...
...


The following packages have unmet dependencies:
 nodejs : Depends: libgcc-s1 (>= 3.4) but it is not installable
E: Unable to correct problems, you have held broken packages.

q0rban avatar Jul 29 '21 18:07 q0rban

Same underlying issue but I want to point out that this additionally breaks for both ubuntu:xenial and ubuntu:bionic which up to today both built fine.

docker run ubuntu:xenial bash -c 'apt-get update && apt-get -y install curl && curl -fsSL https://deb.nodesource.com/setup_12.x | bash - && apt-get -y install nodejs'
docker run ubuntu:bionic bash -c 'apt-get update && apt-get -y install curl && curl -fsSL https://deb.nodesource.com/setup_12.x | bash - && apt-get -y install nodejs'

agundy avatar Jul 29 '21 19:07 agundy

Same issue with Node 14.x as well, went looking for changes to the debian packages recently but didn't find any

gcarothers avatar Jul 29 '21 19:07 gcarothers

I confirm:

docker run debian:stable bash -c 'apt-get update && apt-get -y install curl && curl -fsSL https://deb.nodesource.com/setup_12.x | bash - && apt-get -y install nodejs'
....
Reading package lists...
Building dependency tree...
Reading state information...
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 nodejs : Depends: libgcc-s1 (>= 3.4) but it is not installable
E: Unable to correct problems, you have held broken packages.

zodman avatar Jul 29 '21 19:07 zodman

arf same, great update :/

Get:9 http://ppa.launchpad.net/ondrej/php/ubuntu bionic/main amd64 Packages [157 kB]
Fetched 198 kB in 1s (223 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 nodejs : Depends: libgcc-s1 (>= 3.4) but it is not installable
E: Unable to correct problems, you have held broken packages.

scwall avatar Jul 29 '21 19:07 scwall

We are actively working on solving this issue, as soon as it has been fixed it will be reported here.

igsu avatar Jul 29 '21 20:07 igsu

If you can afford to use Node v16, this problem doesn't seem to occur when installing this version. Can anyone else confirm?

See https://github.com/nodesource/distributions#installation-instructions

EnnioWolsink avatar Jul 29 '21 20:07 EnnioWolsink

Based on this other topic: https://github.com/nodesource/distributions/issues/33

We found a temp workaround by pinning to the previous version. We're using docker w/ Ubuntu & Node 14, so added with this:

RUN set -ex \
    apt-get update \
    curl -o nodejs.deb https://deb.nodesource.com/node_14.x/pool/main/n/nodejs/nodejs_14.17.2-1nodesource1_amd64.deb \
    apt-get install -y ./nodejs.deb \
    rm nodejs.deb \
    rm -rf /var/lib/apt/lists/*

doc-balto avatar Jul 29 '21 20:07 doc-balto

We have detected the source of the problem and this issue has been fixed.

igsu avatar Jul 29 '21 20:07 igsu

Fix worked for me @igsu 🙏

excid3 avatar Jul 29 '21 20:07 excid3

Get:5 https://deb.nodesource.com/node_12.x stretch/main amd64 nodejs amd64 12.22.4-1nodesource1 [18.2 MB]
Err:5 https://deb.nodesource.com/node_12.x stretch/main amd64 nodejs amd64 12.22.4-1nodesource1
  Writing more data than expected (18201958 > 18198878)
  Hashes of expected file:
   - SHA256:e06f310695beca44b83eea02ea0ca3d518e3b04dfc28697a356383a2a8f462a1
   - SHA1:f8dbe1c58e0b37f8122dc70173215bc006323095 [weak]
   - MD5Sum:a20874d3437df32c259fa27d11d26d9d [weak]
   - Filesize:18198878 [weak]

Fetched 2338 kB in 0s (8342 kB/s)
E: Failed to fetch https://deb.nodesource.com/node_12.x/pool/main/n/nodejs/nodejs_12.22.4-1nodesource1_amd64.deb  Writing more data than expected (18201958 > 18198878)
   Hashes of expected file:
    - SHA256:e06f310695beca44b83eea02ea0ca3d518e3b04dfc28697a356383a2a8f462a1
    - SHA1:f8dbe1c58e0b37f8122dc70173215bc006323095 [weak]
    - MD5Sum:a20874d3437df32c259fa27d11d26d9d [weak]
    - Filesize:18198878 [weak]

Unfortunately still failing for me.

needcaffeine avatar Jul 29 '21 20:07 needcaffeine

Get:5 https://deb.nodesource.com/node_12.x stretch/main amd64 nodejs amd64 12.22.4-1nodesource1 [18.2 MB]
Err:5 https://deb.nodesource.com/node_12.x stretch/main amd64 nodejs amd64 12.22.4-1nodesource1
  Writing more data than expected (18201958 > 18198878)
  Hashes of expected file:
   - SHA256:e06f310695beca44b83eea02ea0ca3d518e3b04dfc28697a356383a2a8f462a1
   - SHA1:f8dbe1c58e0b37f8122dc70173215bc006323095 [weak]
   - MD5Sum:a20874d3437df32c259fa27d11d26d9d [weak]
   - Filesize:18198878 [weak]

Fetched 2338 kB in 0s (8342 kB/s)
E: Failed to fetch https://deb.nodesource.com/node_12.x/pool/main/n/nodejs/nodejs_12.22.4-1nodesource1_amd64.deb  Writing more data than expected (18201958 > 18198878)
   Hashes of expected file:
    - SHA256:e06f310695beca44b83eea02ea0ca3d518e3b04dfc28697a356383a2a8f462a1
    - SHA1:f8dbe1c58e0b37f8122dc70173215bc006323095 [weak]
    - MD5Sum:a20874d3437df32c259fa27d11d26d9d [weak]
    - Filesize:18198878 [weak]

Unfortunately still failing for me.

I get a similar error but it says Mirror sync in progress in the Failed to fetch... line. Hopefully it will resolve itself in a bit.

LupineDev avatar Jul 29 '21 20:07 LupineDev

Confirmed working thanks @igsu

nickatnight avatar Jul 29 '21 20:07 nickatnight

I can confirm that it resolved itself! Thanks @igsu.

needcaffeine avatar Jul 29 '21 20:07 needcaffeine

Confirming that it resolved itself! Thanks @igsu :)

sushanth-krishnaswamy avatar Jul 29 '21 21:07 sushanth-krishnaswamy

Verified on my side, it is working for me. Thank you, team.

arunchandrancTR avatar Jul 29 '21 21:07 arunchandrancTR

Thanks for the prompt fix, it was breaking Tugboat builds for our customers… Closing the issue. Oh, and here's a goat for your troubles. 🐐

q0rban avatar Jul 29 '21 21:07 q0rban

thank you for your promptness @igsu

scwall avatar Jul 30 '21 08:07 scwall

Still have an issue on CircleCI with :

curl -fsSL https://deb.nodesource.com/setup_14.x | bash -
apt-get install -y nodejs

Get:1 http://deb.debian.org/debian buster/main amd64 libpython2.7-minimal amd64 2.7.16-2+deb10u1 [395 kB] Get:2 http://deb.debian.org/debian buster/main amd64 python2.7-minimal amd64 2.7.16-2+deb10u1 [1369 kB] Get:3 https://deb.nodesource.com/node_14.x buster/main amd64 nodejs amd64 14.17.4-1nodesource1 [25.0 MB] Err:3 https://deb.nodesource.com/node_14.x buster/main amd64 nodejs amd64 14.17.4-1nodesource1 File has unexpected size (25211968 != 25045506). Mirror sync in progress? [IP: 23.62.230.111 443] Hashes of expected file:

  • SHA256:796a1b5f6fa3caddd4b1f6e31bb8e98a1f289dae638a17d41ec73be0d080eceb
  • SHA1:d7e7966ad5ba47486a307d33b61b637e11c87335 [weak]
  • MD5Sum:2c4e16dcadfed0711d1a3192da4c6d1e [weak]
  • Filesize:25045506 [weak]

adrienfr avatar Jul 30 '21 11:07 adrienfr

Hello! Thank you all for fixing yesterday. I am also still experiencing the checksum failure:

Get:1 https://deb.nodesource.com/node_12.x buster/main amd64 nodejs amd64 12.22.4-1nodesource1 [18.2 MB]
Err:1 https://deb.nodesource.com/node_12.x buster/main amd64 nodejs amd64 12.22.4-1nodesource1
  File has unexpected size (18316392 != 18198878). Mirror sync in progress? [IP: 23.62.230.111 443]
  Hashes of expected file:
   - SHA256:e06f310695beca44b83eea02ea0ca3d518e3b04dfc28697a356383a2a8f462a1
   - SHA1:f8dbe1c58e0b37f8122dc70173215bc006323095 [weak]
   - MD5Sum:a20874d3437df32c259fa27d11d26d9d [weak]
   - Filesize:18198878 [weak]
E: Failed to fetch https://deb.nodesource.com/node_12.x/pool/main/n/nodejs/nodejs_12.22.4-1nodesource1_amd64.deb  File has unexpected size (18316392 != 18198878). Mirror sync in progress? [IP: 23.62.230.111 443]
   Hashes of expected file:
    - SHA256:e06f310695beca44b83eea02ea0ca3d518e3b04dfc28697a356383a2a8f462a1
    - SHA1:f8dbe1c58e0b37f8122dc70173215bc006323095 [weak]
    - MD5Sum:a20874d3437df32c259fa27d11d26d9d [weak]
    - Filesize:18198878 [weak]

eric-eye avatar Jul 30 '21 13:07 eric-eye