我從Windows轉移到Ubuntu和之後的指令按照網站 - https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions無法在Ubuntu上安裝節點16.04
繼COMAND成功
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
然後
sudo apt-get install -y nodejs
冉上述命令的輸出是:
$sudo apt-get install -y nodejs
Reading package lists... Done
Building dependency tree
Reading state information... Done
nodejs is already the newest version (4.2.6~dfsg-1ubuntu4.1).
0 upgraded, 0 newly installed, 0 to remove and 519 not upgraded.
正如你可以看到它的服用4版本的NodeJS,雖然我試圖安裝8+
我刪除了與的NodeJS
sudo apt-get remove nodejs
,但仍試圖再次,它說同樣的事情。 請注意,該設置是新的,沒有什麼以前安裝
我不知道,但我想「節點」,爲什麼它的努力。如果我試圖這樣做安裝的NodeJS
-
$ sudo apt-get install node
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package node is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'node' has no installation candidate
使用nvm來管理node.js的版本 –
看起來'sudo apt-get update'(應該是安裝程序腳本的一部分)沒有運行(正確)。當你分開運行時會發生什麼? – robertklep