问题描述
给出一个nodejs.makefile
,其中包含用于安装nodejs/npm&的命令.一些npm软件包,例如:
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
然后我运行:
sudo make -f nodejs.makefile
,但由于以下错误,我在sudo apt-get update
级别(命令2)停了下来:
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
检查后,出现"错误100 "只是sudo apt-get update
失败的错误消息.但是我不知道为什么这种著名的nodejs
安装方式实际上会失败,这可能是启动板服务器故障了吗?
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 ?
如何使其起作用?
推荐答案
该项目从Launchpad移至NodeSource.信息位于此处和此处.
The project move from Launchpad to NodeSource. Information are here and here.
您可以改为在CLI中执行此操作:
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
如果sudo apt-get -y install nodejs
失败,请尝试:
sudo apt-get update
sudo apt-get -y install nodejs --fix-missing
这篇关于Node.js ppa:Chris-lea/node.js失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!