1

nodejs nodejs.makefile/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しかし、エラーによってレベル(コマンド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

確認したところ、「Error 100」は単なるsudo apt-get update失敗のエラー メッセージのようです。しかし、この有名なnodejsインストール方法が実際に失敗する理由がわかりません。ランチパッド サーバーが故障している可能性があります。

それを機能させる方法は?

4

2 に答える 2

2

プロジェクトは Launchpad から NodeSource に移動します。情報はこちらこちら

代わりに、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
于 2014-12-28T10:30:22.233 に答える
0

現在、joyent (主要な nodejs バッカー)からの公式の指示があります。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

他の UNIX ディストリビューション、osx、および Windows については、リンクを参照してください。

于 2014-12-28T12:32:35.897 に答える