繁体   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