2016-03-26 32 views
0

Ubutun 14.04でnpm経由でoffice libをインストールしようとしています。それは機能しません。イムノード使用:v4.4.0、NPM:v.2.14.20とPython:NPMオフィスをインストールし実行した後v2.6.9ubuntu npmノードのインストールでlibエラーが発生する

を、私は次の出力を得る:任意の助けあなたのため

make: *** [Release/obj.target/node_expat/node-expat.o] Error 1 
make: Leaving directory `/home/apps/lsb.gorillab.co/node_modules/office/node_modul               es/xml2json/node_modules/node-expat/build' 
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2 
gyp ERR! stack  at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/               node-gyp/lib/build.js:276:23) 
gyp ERR! stack  at emitTwo (events.js:87:13) 
gyp ERR! stack  at ChildProcess.emit (events.js:172:7) 
gyp ERR! stack  at Process.ChildProcess._handle.onexit (internal/child_process.               js:200:12) 
gyp ERR! System Linux 3.13.0-83-generic 
gyp ERR! command "/usr/bin/nodejs" "/usr/lib/node_modules/npm/node_modules/node-gy               p/bin/node-gyp.js" "rebuild" 
gyp ERR! cwd /home/apps/lsb.gorillab.co/node_modules/office/node_modules/xml2json/               node_modules/node-expat 
gyp ERR! node -v v4.4.0 
gyp ERR! node-gyp -v v3.3.0 
gyp ERR! not ok 
npm info [email protected] Failed to exec install script 
npm ERR! Linux 3.13.0-83-generic 
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "-d" "office" 
npm ERR! node v4.4.0 
npm ERR! npm v2.14.20 
npm ERR! code ELIFECYCLE 

npm ERR! [email protected] install: `node-gyp rebuild` 
npm ERR! Exit status 1 
npm ERR! 
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'. 
npm ERR! This is most likely a problem with the node-expat package, 
npm ERR! not with npm itself. 
npm ERR! Tell the author that this fails on your system: 
npm ERR!  node-gyp rebuild 
npm ERR! You can get information on how to open an issue for this project with: 
npm ERR!  npm bugs node-expat 
npm ERR! Or if that isn't available, you can get their info via: 
npm ERR! 
npm ERR!  npm owner ls node-expat 
npm ERR! There is likely additional logging output above. 
npm info preuninstall [email protected] 
npm info uninstall [email protected] 
npm info postuninstall [email protected] 
npm info preuninstall [email protected] 
npm info uninstall [email protected] 
npm info postuninstall [email protected] 
npm info preuninstall [email protected] 
npm info uninstall [email protected] 
npm info postuninstall [email protected] 

npm ERR! Please include the following file with any support request: 
npm ERR!  /home/apps/lsb.gorillab.co/npm-debug.log 

感謝を提供することができます。

+0

必要なビルド環境がインストールされていますか(たとえば 'sudo apt-get install build-essential')? – mscdex

+0

しかし、それでも動作しません – user3422449

+0

あなたは完全なログをどこかに投稿できますか? – mscdex

答えて

1

問題は、インストールされているnode-expatのバージョンが古いため、ノードv4 +をサポートできないことです。ノードv4 +の互換性のために、v2.3.13のような最新のバージョン(これは最新のものです)が必要です。

この場合 node-expatが依存関係としてインストールされているので

、あなたは依存関係ツリーを歩く必要があるとofficeに、その後xml2jsonから始めて、適切な場合にはそれらの依存関係を更新するために、各モジュールのメンテナになるだろう。しかし、この特定のケースでは、xml2jsonは既にnode-expatの新しいバージョンを引き出しており、そのxml2json依存関係を更新する必要があるのはofficeだと思われます。残念ながら、officeモジュールは2年間で更新されていないため、モジュールを使用する場合は、それをフォークして依存関係を更新する必要があります。

+0

返事ありがとうございますが、私は別の答えを見つけ出しています。私はなぜオフィスのlibをいくつかのubuntuコンピュータにインストールすることはできません最新のノードバージョン。 – user3422449

+0

'office'モジュールは、ノードv0.10.xのような古いノードのバージョンにインストールされます。これは古いノードのバージョン専用に設計された他の古いモジュール(つまり' node-expat')に依存するためです。他の場所で働くことができる唯一の方法です。 – mscdex

+0

申し訳ありませんが、私はノードをv0.10に再インストールしました。たくさんのおじいちゃんに感謝! – user3422449

関連する問題