遵循Hyperledger Dev课程https://hyperledger.github.io/composer/latest/installing/development-tools.html
然后在Mac OS上运行npm install -g composer-cli
命令。好像没有权限问题,我以前有过。这是从下面的日志中突出的那一行;
Failed at the grpc@1.10.1 install script.
我正在运行NPM版本6.7.0和节点版本11.10.0
18655 silly install grpc@1.10.1
18656 info lifecycle grpc@1.10.1~install: grpc@1.10.1
18657 verbose lifecycle grpc@1.10.1~install: unsafe-perm in lifecycle true
18658 verbose lifecycle grpc@1.10.1~install: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/usr/local/lib/node_modules/composer-cli/node_modules/grpc/node_modules/.bin:/usr/local/lib/node_modules/composer-cli/node_modules/.bin:/usr/local/lib/node_modules/.bin:/Applications/Postgres.app/Contents/Versions/latest/bin:/usr/local:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:/Library/Frameworks/Mono.framework/Versions/Current/Commands
18659 verbose lifecycle grpc@1.10.1~install: CWD: /usr/local/lib/node_modules/composer-cli/node_modules/grpc
18660 silly lifecycle grpc@1.10.1~install: Args: [ '-c',
18660 silly lifecycle 'node-pre-gyp install --fallback-to-build --library=static_library' ]
18661 silly lifecycle grpc@1.10.1~install: Returned: code: 1 signal: null
18662 info lifecycle grpc@1.10.1~install: Failed to exec install script
18663 timing action:install Completed in 40426ms
18664 verbose unlock done using /Users/mu/.npm/_locks/staging-3a08f0df5026584d.lock for /usr/local/lib/node_modules/.staging
18665 timing stage:rollbackFailedOptional Completed in 1847ms
18666 timing stage:runTopLevelLifecycles Completed in 62690ms
18667 verbose stack Error: grpc@1.10.1 install:
节点预gyp安装--fallback-to-build --library = static_library
18667 verbose stack Exit status 1
18667 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
18667 verbose stack at EventEmitter.emit (events.js:197:13)
18667 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
18667 verbose stack at ChildProcess.emit (events.js:197:13)
18667 verbose stack at maybeClose (internal/child_process.js:984:16)
18667 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:265:5)
18668 verbose pkgid grpc@1.10.1
18669 verbose cwd /Users/mu/Documents/Hyperledger
18670 verbose Darwin 18.2.0
18671 verbose argv "/usr/local/Cellar/node/11.10.0/bin/node" "/usr/local/bin/npm" "install" "-g" "composer-cli"
18672 verbose node v11.10.0
18673 verbose npm v6.7.0
18674 error code ELIFECYCLE
18675 error errno 1
18676 error grpc@1.10.1 install:
节点预gyp安装--fallback-to-build --library = static_library { {1}}