Nodejs ppa:Chris-lea/node.js fails
Asked Answered
E

2

1

Given a nodejs.makefile which contains the commands to install nodejs/npm & some npm packages, such:

nodejs:
    sudo add-apt-repository -y ppa:chris-lea/node.js   #install fresh nodejs
    sudo apt-get update
    sudo apt-get install -y nodejs
    sudo npm update -g npm                             #refresh npm
    sudo npm install -g topojson jsdom minimist        #install npm modules
    npm cache clean

I then run :

sudo make -f nodejs.makefile

but I get stopped at the sudo apt-get update level (command 2) by the error :

...     #some messages here
apt-get update
...       #many other messages there
Ign http://fr.archive.ubuntu.com trusty/universe Translation-en_US
W: Failed to fetch http://ppa.launchpad.net/jonoomph/openshot-edge/ubuntu/dists/trusty/main/binary-amd64/Packages  404  Not Found
W: Failed to fetch http://ppa.launchpad.net/jonoomph/openshot-edge/ubuntu/dists/trusty/main/binary-i386/Packages  404  Not Found
W: Failed to fetch http://ppa.launchpad.net/michael-gruz/canon/ubuntu/dists/trusty/main/binary-amd64/Packages  404  Not Found
W: Failed to fetch http://ppa.launchpad.net/michael-gruz/canon/ubuntu/dists/trusty/main/binary-i386/Packages  404  Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead.
make: *** [nodejs] Error 100

After checking, it appears the "Error 100" is simply the error message of sudo apt-get update failing. But I can't get why this famous nodejs install way is actually failing, could it be the launchpad servers being out of order ?

How to make it works ?

Epicurus answered 14/8, 2014 at 23:49 Comment(0)
K
2

The project move from Launchpad to NodeSource. Information are here and here.

You can do this instead, in the CLI:

# runs new installer, remove Launchpad repository entry if it exists:
curl -sL https://deb.nodesource.com/setup | sudo bash -    
sudo apt-get -y install nodejs          # install nodejs
sudo npm install npm -g                 # update NPM to latest stable

If sudo apt-get -y install nodejs fails, try:

 sudo apt-get update
 sudo apt-get -y install nodejs --fix-missing
Kaliningrad answered 28/12, 2014 at 10:30 Comment(0)
E
0

There are now official instructions from joyent (primary nodejs backer). For Ubuntu:

sudo apt-get purge nodejs npm                               # clean up the place
curl -sL https://deb.nodesource.com/setup | sudo bash -     # add repository
sudo apt-get install -y nodejs                              # install both nodejs & npm

For other unix distributions, osx and windows see the link.

Epicurus answered 28/12, 2014 at 12:32 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.