
Ich verwende Debian 11, vollständig auf dem neuesten Stand ( apt-get update && apt-get upgrade && apt-get dist-upgrade
). Ich habe zuvor nodejs
Version 12.22 installiert, da diese im Debian-Repo enthalten ist, und zwar so:
$ sudo apt-get install nodejs
$ node -v
v12.22.5
Ich möchte jedoch Version 14.18 verwenden. Ich habe alle Spuren der Knotenversion 12 wie folgt entfernt:
$ sudo apt-get remove --purge nodejs
Und dann das PPA für nodejs hinzugefügt mithttps://github.com/nodesource/distributions:
$ curl -fsSL https://deb.nodesource.com/setup_lts.x -o nodesource_setup_14_lts.sh
$ sudo bash nodesource_setup_14_lts.sh
Ich sehe, dass das neue PPA unter folgendem Link hinzugefügt wurde /etc/apt/sources.list.d/
:
$ cat /etc/apt/sources.list.d/nodesource.list
deb [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_14.x bullseye main
deb-src [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_14.x bullseye main
$ sudo apt-get update
Hit:1 http://httpredir.debian.org/debian bullseye InRelease
Hit:2 http://httpredir.debian.org/debian-security bullseye-security InRelease
Hit:3 http://httpredir.debian.org/debian bullseye-updates InRelease
Hit:4 https://deb.nodesource.com/node_14.x bullseye InRelease
Reading package lists... Done
Aber wenn ich jetzt mit der Installation beginne, nodejs
wird immer noch Version 12 verwendet :(
$ sudo apt-get install nodejs --dry-run
The following NEW packages will be installed:
nodejs
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Inst nodejs (12.22.5~dfsg-2~11u1 Debian:11.1/stable, Debian-Security:11/stable-security [i386])
Conf nodejs (12.22.5~dfsg-2~11u1 Debian:11.1/stable, Debian-Security:11/stable-security [i386])
Es scheint, dass apt-get
das neue PPA nicht verwendet wird, um die nodejs
zu installierende Version zu bestimmen. Wie kann ich v14.18 systemweit installieren?
Bearbeiten
Beachten Sie, dass ich eine 32-Bit-Maschine verwende:
$ uname -m
i686
Wenn ich das obige Verfahren auf meiner anderen 64-Bit-Maschine durchführe, funktioniert es einwandfrei und installiert Version 14.18 vom PPA.
Zusätzlich angeforderte Informationen:
$ apt-cache policy nodejs
nodejs:
Installed: (none)
Candidate: 12.22.5~dfsg-2~11u1
Version table:
12.22.5~dfsg-2~11u1 500
500 http://httpredir.debian.org/debian bullseye/main i386 Packages
500 http://httpredir.debian.org/debian-security bullseye-security/main i386 Packages
Antwort1
i386-Builds wurden gelöscht.Siehe Verfügbare Architekturen
NodeSource wird die folgenden Architekturen weiterhin pflegen und in Zukunft möglicherweise weitere hinzufügen.
amd64 (64-bit)
armhf (ARM 32-bit hard-float, ARMv7 and up: arm-linux-gnueabihf)
arm64 (ARM 64-bit, ARMv8 and up: aarch64-linux-gnu)
Sie müssen nodejs
aus Debian-Repositorys statt aus Node-Repositorys installieren.