Given a nodejs.makefile
其中包含安装 nodejs/npm 和一些 npm 包的命令,例如:
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
level(命令2)错误:
... #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
安装方式实际上失败了,是否是启动板服务器出现故障?
如何使其发挥作用?
该项目从 Launchpad 转移到 NodeSource。信息有here and here.
您可以在 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
失败,尝试:
sudo apt-get update
sudo apt-get -y install nodejs --fix-missing
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)