node-gyp重build失败:找不到ares.h文件

升级node-gyp rebuild后,我的系统上的nodejs版本从0.10.37升级到了0.12.5,在我使用的一个npm软件包失败之后。 它给出一个错误“ares.h”文件没有find。

这是我build立它时得到的错误

CXX(target) Release/obj.target/ancillary/src/ancillary.o In file included from ../src/ancillary.cc:4: In file included from /Users//.node-gyp/0.12.2/src/stream_wrap.h:25: /Users//.node-gyp/0.12.2/src/env.h:25:10: fatal error: 'ares.h' file not found #include "ares.h" ^ 1 error generated. make: *** [Release/obj.target/ancillary/src/ancillary.o] Error 1 gyp ERR! build error gyp ERR! stack Error: `make` failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/node-gyp/lib/build.js:269:23) gyp ERR! stack at ChildProcess.emit (events.js:110:17) gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1074:12) gyp ERR! System Darwin 14.3.0 gyp ERR! command "node" "/usr/local/bin/node-gyp" "rebuild" gyp ERR! cwd /Users//src/node-ancillary gyp ERR! node -v v0.12.2 gyp ERR! node-gyp -v v2.0.1 gyp ERR! not ok 

当我做npm版本时,我明白了

 { npm: '2.12.0', http_parser: '2.3', modules: '14', node: '0.12.2', openssl: '1.0.1m', uv: '1.4.2-node1', v8: '3.28.73', zlib: '1.2.8' } 

用我以前得到的旧版本的nodejs版本

 { http_parser: '1.0', node: '0.10.37', v8: '3.14.5.9', ares: '1.9.0-DEV', uv: '0.10.36', zlib: '1.2.8', modules: '11', openssl: '1.0.1l', npm: '1.4.28' } 

在新版本中,我看不到npm版本结果中的ares包,我怀疑它是构build失败的问题。

我怎样才能摆脱上面提到的构build错误?