簡體   English   中英

在Ubuntu 16.10上安裝Node.js時出現問題

[英]Problems installing nodejs on Ubuntu 16.10

有人可以幫助我了解為什么找不到這些軟件包嗎?

sudo apt-get install -y nodejs
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  libuv1
The following NEW packages will be installed:
  libuv1 nodejs
0 upgraded, 2 newly installed, 0 to remove and 28 not upgraded.
Need to get 3.346 kB of archives.
After this operation, 14,1 MB of additional disk space will be used.
Err:1 http://it.archive.ubuntu.com/ubuntu yakkety/universe amd64 libuv1 amd64 1.9.1-1
  404  Not Found
Err:2 http://it.archive.ubuntu.com/ubuntu yakkety/universe amd64 nodejs amd64 4.2.6~dfsg-1ubuntu5
  404  Not Found
E: Failed to fetch http://it.archive.ubuntu.com/ubuntu/pool/universe/libu/libuv1/libuv1_1.9.1-1_amd64.deb  404  Not Found
E: Failed to fetch http://it.archive.ubuntu.com/ubuntu/pool/universe/n/nodejs/nodejs_4.2.6~dfsg-1ubuntu5_amd64.deb  404  Not Found
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

嘗試像這樣安裝

curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs
Follow the Steps to install Nodejs using terminal.. Make sure your connected to internet

cd ~
curl -sL https://deb.nodesource.com/setup_8.x -o nodesource_setup.sh
nano nodesource_setup.sh
sudo bash nodesource_setup.sh
sudo apt-get install nodejs

After Installing Check the Version... 
nodejs -v

Can also check the NPM version by 
npm -v

https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-ubuntu-16-04

或者,可以使用NVM管理計算機的NodeJS版本。 NVM代表節點版本管理器。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM