安装posix时npm安装错误

时间:2015-06-06 17:10:19

标签: linux node.js centos npm posix

我是nodejs和npm的新手。我想安装p3(https://github.com/digitalbazaar/p3)。首先,我必须安装bedrock(github.com/digitalbazaar/bedrock),因为它是在指令中编写的,但是在命令" npm install"在bedrock文件夹中它失败了。似乎npm或者某些东西无法编译一些posix源文件。控制台输出:

[root@localhost bedrock]# npm install
npm WARN package.json bedrock@1.0.2-dev No license field.

posix@1.0.4 install /root/bedrock/node_modules/posix
node-gyp rebuild

make: Entering directory `/root/bedrock/node_modules/posix/build'
  CXX(target) Release/obj.target/posix/src/posix.o
../src/posix.cc:16:41: error: ‘Arguments’ does not name a type
 static Handle<Value> node_getppid(const Arguments& args) {
                                         ^
../src/posix.cc:16:52: error: ISO C++ forbids declaration of ‘args’ with no type [-fpermissive]
 static Handle<Value> node_getppid(const Arguments& args) {
                                                    ^
In file included from /root/.node-gyp/0.12.4/src/node.h:61:0,
                 from ../src/posix.cc:1:

完整控制台输出:http://pastebin.com/HdTvNNMz

My configuration
[root@localhost bedrock]# node -v
v0.12.4
[root@localhost bedrock]# npm -v
2.10.1
[root@localhost bedrock]# uname -a
Linux localhost.localdomain 3.10.0-229.el7.x86_64 #1 SMP Fri Mar 6 11:36:42 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

1 个答案:

答案 0 :(得分:1)

bedrock依赖的payswarm-auth版本太旧了。 posix不仅已更新为使用nan与较新版本的node / io.js兼容,而且bedrock的较新版本甚至根本不使用posix