Дело привычное, как и по другим инструментам - ищем как установить более свежую версию...
Installing Node.js 18 LTS on Ubuntu 22.04|20.04|18.04
Install Node.js 18 on Ubuntu / Debian / Linux MintBy Klinsmann Öteyo - October 6, 2023
By Josphat Mutai - August 16, 2023
Код: Выделить всё
olej@R420:~/Signal-Desktop$ curl -sL https://deb.nodesource.com/setup_18.x | sudo bash -
================================================================================
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
================================================================================
SCRIPT DEPRECATION WARNING
This script, located at https://deb.nodesource.com/setup_X, used to
install Node.js is deprecated now and will eventually be made inactive.
Please visit the NodeSource distributions Github and follow the
instructions to migrate your repo.
https://github.com/nodesource/distributions
The NodeSource Node.js Linux distributions GitHub repository contains
information about which versions of Node.js and which Linux distributions
are supported and how to install it.
https://github.com/nodesource/distributions
SCRIPT DEPRECATION WARNING
================================================================================
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
================================================================================
TO AVOID THIS WAIT MIGRATE THE SCRIPT
Continuing in 60 seconds (press Ctrl-C to abort) ...
## Installing the NodeSource Node.js 18.x repo...
## Populating apt-get cache...
+ apt-get update
Сущ:1 https://dl.yarnpkg.com/debian stable InRelease
Игн:2 https://mirror.host4biz.eu/linuxmint/pkg victoria InRelease
Сущ:3 https://mirror.host4biz.eu/linuxmint/pkg victoria Release
Сущ:4 http://neilalexander.s3.dualstack.eu-west-2.amazonaws.com/deb debian InRelease
Сущ:5 http://security.ubuntu.com/ubuntu jammy-security InRelease
Сущ:6 https://linux.teamviewer.com/deb stable InRelease
Сущ:7 https://brave-browser-apt-release.s3.brave.com stable InRelease
Сущ:9 http://ubuntu.volia.net/ubuntu-archive jammy InRelease
Сущ:10 http://ubuntu.volia.net/ubuntu-archive jammy-updates InRelease
Сущ:11 http://ubuntu.volia.net/ubuntu-archive jammy-backports InRelease
Сущ:12 https://deb.opera.com/opera-stable stable InRelease
Сущ:13 https://repo.skype.com/deb stable InRelease
Сущ:14 https://packages.microsoft.com/repos/ms-teams stable InRelease
Сущ:15 http://dl.google.com/linux/chrome/deb stable InRelease
Пол:16 https://dl.modular.com/public/installer/deb/linuxmint vanessa InRelease [5.080 B]
Получено 5.080 B за 6с (824 B/s)
Чтение списков пакетов… Готово
W: https://dl.yarnpkg.com/debian/dists/stable/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
W: https://repo.skype.com/deb/dists/stable/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
## You seem to be using Linux Mint version victoria.
## This maps to Ubuntu "jammy"... Adjusting for you...
## Confirming "jammy" is supported...
+ curl -sLf -o /dev/null 'https://deb.nodesource.com/node_18.x/dists/jammy/Release'
## Adding the NodeSource signing key to your keyring...
+ curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | gpg --dearmor | tee /usr/share/keyrings/nodesource.gpg >/dev/null
## Creating apt sources list file for the NodeSource Node.js 18.x repo...
+ echo 'deb [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x jammy main' > /etc/apt/sources.list.d/nodesource.list
+ echo 'deb-src [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x jammy main' >> /etc/apt/sources.list.d/nodesource.list
## Running `apt-get update` for you...
+ apt-get update
Сущ:1 http://security.ubuntu.com/ubuntu jammy-security InRelease
Пол:2 https://dl.modular.com/public/installer/deb/linuxmint vanessa InRelease [5.080 B]
Сущ:3 http://ubuntu.volia.net/ubuntu-archive jammy InRelease
Сущ:4 http://ubuntu.volia.net/ubuntu-archive jammy-updates InRelease
Сущ:5 http://ubuntu.volia.net/ubuntu-archive jammy-backports InRelease
Игн:6 https://mirror.host4biz.eu/linuxmint/pkg victoria InRelease
Сущ:7 https://mirror.host4biz.eu/linuxmint/pkg victoria Release
Сущ:8 http://neilalexander.s3.dualstack.eu-west-2.amazonaws.com/deb debian InRelease
Пол:9 https://deb.nodesource.com/node_18.x jammy InRelease [4.563 B]
Сущ:10 https://brave-browser-apt-release.s3.brave.com stable InRelease
Сущ:11 https://deb.opera.com/opera-stable stable InRelease
Пол:13 https://deb.nodesource.com/node_18.x jammy/main amd64 Packages [776 B]
Сущ:14 https://linux.teamviewer.com/deb stable InRelease
Сущ:15 https://dl.yarnpkg.com/debian stable InRelease
Сущ:16 http://dl.google.com/linux/chrome/deb stable InRelease
Сущ:17 https://packages.microsoft.com/repos/ms-teams stable InRelease
Сущ:18 https://repo.skype.com/deb stable InRelease
Получено 10,4 kB за 7с (1.503 B/s)
Чтение списков пакетов… Готово
W: https://dl.yarnpkg.com/debian/dists/stable/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
W: https://repo.skype.com/deb/dists/stable/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
## Run `sudo apt-get install -y nodejs` to install Node.js 18.x and npm
## You may also need development tools to build native addons:
sudo apt-get install gcc g++ make
## To install the Yarn package manager, run:
curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | sudo tee /usr/share/keyrings/yarnkey.gpg >/dev/null
echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update && sudo apt-get install yarn
Код: Выделить всё
olej@R420:/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_18.x jammy main
deb-src [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x jammy main
Код: Выделить всё
olej@R420:/etc/apt/sources.list.d$ sudo apt install nodejs
[sudo] пароль для olej:
Чтение списков пакетов… Готово
Построение дерева зависимостей… Готово
Чтение информации о состоянии… Готово
Следующий пакет устанавливался автоматически и больше не требуется:
libjs-highlight.js
Для его удаления используйте «sudo apt autoremove».
Следующие пакеты будут УДАЛЕНЫ:
nodejs-doc
Следующие пакеты будут обновлены:
nodejs
Обновлено 1 пакетов, установлено 0 новых пакетов, для удаления отмечено 1 пакетов, и 6 пакетов не обновлено.
Необходимо скачать 28,9 MB архивов.
После данной операции объём занятого дискового пространства возрастёт на 178 MB.
Хотите продолжить? [Д/н] y
Пол:1 https://deb.nodesource.com/node_18.x jammy/main amd64 nodejs amd64 18.17.1-deb-1nodesource1 [28,9 MB]
Получено 28,9 MB за 7с (4.418 kB/s)
(Чтение базы данных … на данный момент установлено 583582 файла и каталога.)
Удаляется nodejs-doc (12.22.9~dfsg-1ubuntu3.2) …
(Чтение базы данных … на данный момент установлено 583404 файла и каталога.)
Подготовка к распаковке …/nodejs_18.17.1-deb-1nodesource1_amd64.deb …
Распаковывается nodejs (18.17.1-deb-1nodesource1) на замену (12.22.9~dfsg-1ubuntu3.2) …
dpkg: ошибка при обработке архива /var/cache/apt/archives/nodejs_18.17.1-deb-1nodesource1_amd64.deb (--unpack):
попытка перезаписать «/usr/share/systemtap/tapset/node.stp», который уже имеется в пакете libnode72:amd64 12.22.9~dfsg-1ubuntu3.2
При обработке следующих пакетов произошли ошибки:
/var/cache/apt/archives/nodejs_18.17.1-deb-1nodesource1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)