distributions: [ERROR] Node.js 20 on Ubuntu22.04 Installation fail
Describe your bug
1.334 Err:1 https://deb.nodesource.com/node_20.x lunar/main arm64 nodejs arm64 20.5.1-deb-1nodesource1
1.334 404 Not Found [IP: 104.22.5.26 443]
…
88.27 E: Failed to fetch https://deb.nodesource.com/node_20.x/pool/main/n/nodejs/nodejs_20.5.1-deb-1nodesource1_arm64.deb 404 Not Found [IP: 104.22.5.26 443]
88.27 E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
Distribution Information:
- OS: Ubuntu
- Version jammy (22.04)
Node Version:
- Node: Node.js v20.x
To Reproduce Steps to reproduce the behavior:
- Download
https://deb.nodesource.com/gpgkey/nodesource.gpg.key
tonodesource.gpg.key
- Build the following
Dockerfile
via:docker build .
FROM ubuntu:lunar COPY nodesource.gpg.key . ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update RUN apt-get install --yes \ gpg \ software-properties-common RUN gpg --dearmor --output /etc/apt/trusted.gpg.d/nodesource.gpg nodesource.gpg.key && \ add-apt-repository --uri https://deb.nodesource.com/node_20.x RUN apt-get install --yes nodejs
Expected behavior
Node 20.x should be installed.
Screenshots
> [6/6] RUN apt-get install --yes nodejs:
0.926 Reading state information...
1.042 The following NEW packages will be installed:
1.042 nodejs
1.422 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
1.422 Need to get 29.4 MB of archives.
1.422 After this operation, 193 MB of additional disk space will be used.
1.422 Err:1 https://deb.nodesource.com/node_20.x lunar/main arm64 nodejs arm64 20.5.1-deb-1nodesource1
1.422 404 Not Found [IP: 104.22.5.26 443]
1.437 E: Failed to fetch https://deb.nodesource.com/node_20.x/pool/main/n/nodejs/nodejs_20.5.1-deb-1nodesource1_arm64.deb 404 Not Found [IP: 104.22.5.26 443]
1.437 E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
------
Dockerfile.test:13
--------------------
11 | add-apt-repository --uri https://deb.nodesource.com/node_20.x
12 |
13 | >>> RUN apt-get install --yes nodejs
14 |
--------------------
ERROR: failed to solve: process "/bin/sh -c apt-get install --yes nodejs" did not complete successfully: exit code: 100
Additional context I needed to use the package repository key as documented in #1682.
About this issue
- Original URL
- State: closed
- Created 8 months ago
- Reactions: 18
- Comments: 19
Getting the same issue for Node 18.
The same error was happening to me, it worked for me to install nodejs in the new way that they ask for in the documentation: https://github.com/nodesource/distributions
But my version in this case is 18.
I have same issue too
Plz quick fix it 😦(
Installing it according to instructions from deb.nodesource.com using the
nodistro
codename instead of a specific Debian/Ubuntu codename indeed helped to solve the issue. Thanks @soren121!Also note, that they deprecated the old installation scripts (as it’s mentioned in the readme).
Install the repository using the
nodistro
codename instead of a specific Debian/Ubuntu codename.I’m not sure if it’s intentional or an accident, but all of the package files were renamed. They’ve only updated the
nodistro
pool as of now, and not the distro-named pools.seems to be working fine for me now out of no where
we solve it on our project with (for now) replacing current version of node to stable one (.gitlab-ci.yaml)
Workaround for those affected:
I recommend, as we are, you download this to your own S3 bucket or web server. If rwx.work notices or gets overloaded it too may stop working.
You may also need
apt-get update ; apt-get -y install gnupg python3-minimal
before thedpkg
in someslim
images.