2017-07-15 57 views
1

安装的问题,我在Ubuntu安装使用以下命令的NodeJS的NodeJS在Ubuntu

卷曲-SL https://deb.nodesource.com/setup_8.x |须藤-E庆典 - sudo易于得到安装-y的NodeJS

然后给出了这样的消息,

Reading package lists... Done 
Building dependency tree  
Reading state information... Done 
nodejs is already the newest version. 
0 upgraded, 0 newly installed, 0 to remove and 253 not upgraded. 
W: Duplicate sources.list entry https://dl.bintray.com/sbt/debian/ Packages (/var/lib/apt/lists/dl.bintray.com_sbt_debian_Packages) 
W: You may want to run apt-get update to correct these problems 

当我执行 “sudo apt-get的更新”,我得到另一个错误,

W: Failed to fetch http://ppa.launchpad.net/chris-lea/node.js/ubuntu/dists/wily/main/binary-amd64/Packages 404 Not Found 

W: Failed to fetch http://ppa.launchpad.net/chris-lea/node.js/ubuntu/dists/wily/main/binary-i386/Packages 404 Not Found 

W: Failed to fetch http://ppa.launchpad.net/ole.wolf/rarcrack/ubuntu/dists/wily/main/binary-amd64/Packages 404 Not Found 

W: Failed to fetch http://ppa.launchpad.net/ole.wolf/rarcrack/ubuntu/dists/wily/main/binary-i386/Packages 404 Not Found 

E: Some index files failed to download. They have been ignored, or old ones used instead. 

您能否让我知道如何解决这个问题?发生

回答

1

的错误,因为四个源链接,您(或安装程序)添加到您的/etc/apt/sources.list都没有找到,返回错误404

如果说项不在/etc/apt/sources.list,你可以找到他们的一些文件/etc/apt/sources.list.d/*.list

删除包含这些URL的线在你/etc/apt/sources.list(或某些文件/etc/apt/sources.list.d/*.list),并安装Node.js的官方途径:

https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions

curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - 
sudo apt-get install -y nodejs 

或者,如果你想第6版:

curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash - 
sudo apt-get install -y nodejs 

备注

也许你会遇到这个问题,因为你的Ubuntu版本不受支持。 我不认为他们支持15.10,但只有LTS版本(14.04 & 16.04)。

如果可以,请升级到16.04并重试。

+0

非常感谢您的回复。不幸的是,这些文件不包含4个网址。你知道他们可能会被带走吗?再次感谢 – Imran

+0

检查'/ etc/apt/sources.list.d /'下的文件。也许你可以在那里找到条目。我刚刚编辑帖子并添加了其他配置文件位置。 –

相关问题