2016-10-04 8 views
0

今日はnpm installを実行すると失敗し、次のエラーログが表示されます。私はそれがハッシュテーブルの問題だと知っていますが、私は以前にこの問題を抱えていませんでした。 npmインストールでnode-gypビルドエラーが発生しました

> [email protected] install /Users/admin/myproject/node_modules/hashtable 
> node-gyp configure build 

    CXX(target) Release/obj.target/native/src/hashtable.o 
    SOLINK_MODULE(target) Release/native.node 
ld: library not found for -lgcc_s.10.5 
clang: error: linker command failed with exit code 1 (use -v to see invocation) 
make: *** [Release/native.node] Error 1 
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2 
gyp ERR! stack  at ChildProcess.onExit (/Users/admin/.npm-packages/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 Darwin 15.5.0 
gyp ERR! command "/usr/local/bin/node" "/Users/admin/.npm-packages/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "build" 
gyp ERR! cwd /Users/admin/myproject/node_modules/hashtable 
gyp ERR! node -v v4.4.7 
gyp ERR! node-gyp -v v3.4.0 
gyp ERR! not ok 
[email protected] /Users/admin/myproject 
└── (empty) 

npm ERR! Darwin 15.5.0 
npm ERR! argv "/usr/local/bin/node" "/Users/admin/.npm-packages/bin/npm" "install" 
npm ERR! node v4.4.7 
npm ERR! npm v3.10.5 
npm ERR! code ELIFECYCLE 

npm ERR! [email protected] install: `node-gyp configure build` 
npm ERR! Exit status 1 
npm ERR! 
npm ERR! Failed at the [email protected] install script 'node-gyp configure build'. 
npm ERR! Make sure you have the latest version of node.js and npm installed. 
npm ERR! If you do, this is most likely a problem with the hashtable package, 
npm ERR! not with npm itself. 
npm ERR! Tell the author that this fails on your system: 
npm ERR!  node-gyp configure build 
npm ERR! You can get information on how to open an issue for this project with: 
npm ERR!  npm bugs hashtable 
npm ERR! Or if that isn't available, you can get their info via: 
npm ERR!  npm owner ls hashtable 
npm ERR! There is likely additional logging output above. 

npm ERR! Please include the following file with any support request: 
npm ERR!  /Users/admin/myproject/npm-debug.log 
npm ERR! code 1 

は、私は別に npm install node-gyp -gをしましたが、問題は消えていなかったので、ノード-GYPに問題があるかもしれないと思いました。誰もこれを解決する方法を知っていますか?

ところで、私はMacでOSX 10.11.5を実行しています。最近別のプロジェクト用にXcode 6.3.2をインストールしましたが、このバージョンのXCodeしか使用できません。

+0

これはGCCに関連しているようです。あなたはMacかLinux? – andresk

+0

@AndréSpangueroKanayama私はMac上でOSX 10.11.5を実行していますが、最近別のプロジェクト用にXcode 6.3.2をインストールしましたが、それが問題の原因になっているかどうかはわかりません –

+0

XCodeをコンパイラで混乱させて、 Xcodeをアップデートすると、それらの問題が解決されました。 – andresk

答えて

0

node-gypには、MacOSのC++コンパイルでもpythonとxcodeが必要です。他のシステムにも同様の要件があります。

npmページhereでnode-gypパッケージのpre-reqを見つけることができます。

関連する問題