2017-07-15 72 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 /'下的文件。也許你可以在那裏找到條目。我剛剛編輯帖子並添加了其他配置文件位置。 –

相關問題