9

を使用してUbuntu 15.04にelectronをインストールしようとすると

sudo npm install electron-prebuilt -g

これは私が得るものです

/usr/local/bin/electron -> /usr/local/lib/node_modules/electron-prebuilt/cli.js

> electron-prebuilt@0.28.3 postinstall /usr/local/lib/node_modules/electron-prebuilt
> node install.js

Downloading electron-v0.28.3-linux-x64.zip
Error: tunneling socket could not be established, cause=139936635598656:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:s23_clnt.c:795:


/usr/local/lib/node_modules/electron-prebuilt/install.js:15
  throw err
        ^
Error: tunneling socket could not be established, cause=139936635598656:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:s23_clnt.c:795:

npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

npm ERR! electron-prebuilt@0.28.3 postinstall: `node install.js`
npm ERR! Exit status 8
npm ERR! 
npm ERR! Failed at the electron-prebuilt@0.28.3 postinstall script.
npm ERR! This is most likely a problem with the electron-prebuilt package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node install.js
npm ERR! You can get their info via:
npm ERR!     npm owner ls electron-prebuilt
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 3.19.0-18-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "electron-prebuilt"
npm ERR! cwd /usr/bin
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.4.21
npm ERR! code ELIFECYCLE
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /usr/bin/npm-debug.log
npm ERR! not ok code 0

私は試した

コマンドを使用してノードのシステム リンクを作成する: ln -s node nodejsフォルダ/usr/bin/

node-legacy パッケージのインストール:ここsudo apt-get install node-legacyで 提案されているよう に運が悪い。

他のフォーラムではこれ以上何も見つかりませんでした。助けてください。前もって感謝します。

4

8 に答える 8

4

使用する:

ELECTRON_MIRROR= https://npm.taobao.org/mirrors/electron/ npm install

于 2016-06-21T09:28:30.720 に答える
2

ほとんどの場合、プロキシの背後にいます。

これを無効にするか、プロキシの背後で npm install を機能させることができます (この質問を参照してください)。

于 2015-07-01T13:32:30.337 に答える
0

間違って入力しました install nodejs-legacy

sudo apt-get install nodejs-legacy

それを修正してから、electronのインストールを続行します

sudo npm install electron-prebuilt -g
于 2016-11-19T12:05:59.760 に答える