最新消息: 电脑我帮您提供丰富的电脑知识,编程学习,软件下载,win7系统下载。

在MAC OS上安装生成器hyperledger composer时出错

IT培训 admin 2浏览 0评论

在MAC OS上安装生成器hyperledger composer时出错

我正在尝试在Mac上安装Hyperledger Composer开发环境。但是当我尝试使用以下命令安装CLI工具时:

npm install -g composer-cli

出现以下错误消息。我试图将节点版本回滚到6/7但没有成功。

npm WARN弃用了[email protected]:使用mz或fs-extra ^ 3.0和Promise支持

npm WARN deprecated [email protected]: This package is no longer supported. It's now a built-in Node module. If you've depended on crypto, you should switch to the one that's built-in.


> [email protected] install /usr/local/lib/node_modules/generator-hyperledger-composer/node_modules/pkcs11js
> node-gyp rebuild

gyp ERR! configure error 

gyp ERR! stack Error: Python executable "/Users/jloo/anaconda/bin/python" is v3.5.1, which is not supported by gyp.

gyp ERR! stack You can pass the --python switch to point to Python >= v2.5.0 & < 3.0.0.

gyp ERR! stack     at PythonFinder.failPythonVersion (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:492:19)

gyp ERR! stack     at PythonFinder.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:474:14)

gyp ERR! stack     at ChildProcess.exithandler (child_process.js:264:7)

gyp ERR! stack     at ChildProcess.emit (events.js:159:13)

gyp ERR! stack     at maybeClose (internal/child_process.js:943:16)

gyp ERR! stack     at Socket.stream.socket.on (internal/child_process.js:363:11)

gyp ERR! stack     at Socket.emit (events.js:159:13)

gyp ERR! stack     at Pipe._handle.close [as _onclose] (net.js:558:12)

gyp ERR! System Darwin 17.3.0

gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"

gyp ERR! cwd /usr/local/lib/node_modules/generator-hyperledger-composer/node_modules/pkcs11js

gyp ERR! node -v v9.2.1

gyp ERR! node-gyp -v v3.6.2

gyp ERR! not ok 

npm ERR! code ELIFECYCLE

npm ERR! errno 1`enter code here`

npm ERR! [email protected] install: `node-gyp rebuild`

npm ERR! Exit status 1

npm ERR! 

npm ERR! Failed at the [email protected] install script.

npm ERR! This is probably not a problem with npm. There is likely additional logging output above
回答如下:

使用nvm并安装节点版本8 - 稳定。并尝试使用该节点版本运行。

在MAC OS上安装生成器hyperledger composer时出错

我正在尝试在Mac上安装Hyperledger Composer开发环境。但是当我尝试使用以下命令安装CLI工具时:

npm install -g composer-cli

出现以下错误消息。我试图将节点版本回滚到6/7但没有成功。

npm WARN弃用了[email protected]:使用mz或fs-extra ^ 3.0和Promise支持

npm WARN deprecated [email protected]: This package is no longer supported. It's now a built-in Node module. If you've depended on crypto, you should switch to the one that's built-in.


> [email protected] install /usr/local/lib/node_modules/generator-hyperledger-composer/node_modules/pkcs11js
> node-gyp rebuild

gyp ERR! configure error 

gyp ERR! stack Error: Python executable "/Users/jloo/anaconda/bin/python" is v3.5.1, which is not supported by gyp.

gyp ERR! stack You can pass the --python switch to point to Python >= v2.5.0 & < 3.0.0.

gyp ERR! stack     at PythonFinder.failPythonVersion (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:492:19)

gyp ERR! stack     at PythonFinder.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:474:14)

gyp ERR! stack     at ChildProcess.exithandler (child_process.js:264:7)

gyp ERR! stack     at ChildProcess.emit (events.js:159:13)

gyp ERR! stack     at maybeClose (internal/child_process.js:943:16)

gyp ERR! stack     at Socket.stream.socket.on (internal/child_process.js:363:11)

gyp ERR! stack     at Socket.emit (events.js:159:13)

gyp ERR! stack     at Pipe._handle.close [as _onclose] (net.js:558:12)

gyp ERR! System Darwin 17.3.0

gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"

gyp ERR! cwd /usr/local/lib/node_modules/generator-hyperledger-composer/node_modules/pkcs11js

gyp ERR! node -v v9.2.1

gyp ERR! node-gyp -v v3.6.2

gyp ERR! not ok 

npm ERR! code ELIFECYCLE

npm ERR! errno 1`enter code here`

npm ERR! [email protected] install: `node-gyp rebuild`

npm ERR! Exit status 1

npm ERR! 

npm ERR! Failed at the [email protected] install script.

npm ERR! This is probably not a problem with npm. There is likely additional logging output above
回答如下:

使用nvm并安装节点版本8 - 稳定。并尝试使用该节点版本运行。

发布评论

评论列表 (0)

  1. 暂无评论