Не может установить последний стабильный nodejs после того, как узел 6 был установлен

Я пытался обновить узел 6.x до последней конюшни. Я попробовал немного методов Кв. - добираются, nvm, npm, и ничто не помогло.

Почему я не могу получить последний стабильный узел на Ubuntu 16.04, столь же простой как:

sudo apt-get update
sudo apt-get install nodejs

Как я могу получить последний стабильный узел на Ubuntu 16.04?

здесь моя терминальная вставка копии:

pm@pm-node:~$ sudo apt-get update
Ign:1 http://dl.google.com/linux/chrome/deb stable InRelease
Get:2 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]     
Hit:3 http://ua.archive.ubuntu.com/ubuntu xenial InRelease                     
Get:4 http://ua.archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB]    
Hit:5 http://packages.microsoft.com/repos/vscode stable InRelease              
Get:6 http://ua.archive.ubuntu.com/ubuntu xenial-backports InRelease [102 kB]  
Hit:7 http://dl.google.com/linux/chrome/deb stable Release                     
Hit:8 https://deb.nodesource.com/node_8.x xenial InRelease                     
Get:9 http://ua.archive.ubuntu.com/ubuntu xenial-updates/main amd64 DEP-11 Metadata [317 kB]
Get:10 http://ua.archive.ubuntu.com/ubuntu xenial-updates/main DEP-11 64x64 Icons [226 kB]
Get:12 http://ua.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 DEP-11 Metadata [190 kB]
Get:13 http://ua.archive.ubuntu.com/ubuntu xenial-updates/universe DEP-11 64x64 Icons [266 kB]
Get:14 http://ua.archive.ubuntu.com/ubuntu xenial-updates/multiverse amd64 DEP-11 Metadata [5 888 B]
Get:15 http://ua.archive.ubuntu.com/ubuntu xenial-backports/main amd64 DEP-11 Metadata [3 328 B]
Get:16 http://ua.archive.ubuntu.com/ubuntu xenial-backports/universe amd64 Packages [7 084 B]
Get:17 http://ua.archive.ubuntu.com/ubuntu xenial-backports/universe i386 Packages [7 060 B]
Get:18 http://ua.archive.ubuntu.com/ubuntu xenial-backports/universe amd64 DEP-11 Metadata [4 696 B]
Fetched 1 334 kB in 2s (535 kB/s)                                              
Reading package lists... Done
pm@pm-node:~$ sudo apt-get install nodejs
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  nodejs
0 upgraded, 1 newly installed, 0 to remove and 173 not upgraded.
Need to get 0 B/12,7 MB of archives.
After this operation, 61,3 MB of additional disk space will be used.
Selecting previously unselected package nodejs.
(Reading database ... 221467 files and directories currently installed.)
Preparing to unpack .../nodejs_8.10.0-1nodesource1_amd64.deb ...
Unpacking nodejs (8.10.0-1nodesource1) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up nodejs (8.10.0-1nodesource1) ...
pm@pm-node:~$ node -version
bash: /home/pm/.nvm/versions/node/v6.11.4/bin/node: No such file or directory
pm@pm-node:~$ node --version
bash: /home/pm/.nvm/versions/node/v6.11.4/bin/node: No such file or directory
pm@pm-node:~$ 
1
задан 18 March 2018 в 20:30

1 ответ

sudo apt-get install python-software-properties
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -

PPA будет добавлен. После этой установки.

sudo apt-get install nodejs

Для проверки версии пробуют это nodejs -v.

Необходимо видеть вывод как: v8.10.0

Можно хотеть это также:

sudo apt-get install build-essential

Всего наилучшего.


Я только что попробовал свои инструкции относительно debian пи малины, и результат:

pi@192:/ $ nodejs -v
v8.10.0
pi@192:/ $ npm -v
5.6.0
1
ответ дан 7 December 2019 в 15:22

Другие вопросы по тегам:

Похожие вопросы: