Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm ERR! Failed at the pkcs11js@1.0.15 install script. #79

Closed
JulienGuo opened this issue May 29, 2018 · 4 comments
Closed

npm ERR! Failed at the pkcs11js@1.0.15 install script. #79

JulienGuo opened this issue May 29, 2018 · 4 comments

Comments

@JulienGuo
Copy link

root@vm10-210-0-10:/opt/gopath/src/github.com/hyperledger/caliper# node -v
v8.11.2
root@vm10-210-0-10:/opt/gopath/src/github.com/hyperledger/caliper# npm install -g
npm WARN notice [SECURITY] protobufjs has the following vulnerability: 1 moderate. Go here for more details: https://nodesecurity.io/advisories?search=protobufjs&version=5.0.3 - Run npm i npm@latest -g to upgrade your npm version, and then npm audit to get more info.
npm WARN lifecycle grpc@1.10.1~install: cannot run in wd %s %s (wd=%s) grpc@1.10.1 node-pre-gyp install --fallback-to-build --library=static_library /opt/gopath/src/github.com/hyperledger/caliper/node_modules/grpc

  • caliper@0.1.0
    added 303 packages in 30.423s
    root@vm10-210-0-10:/opt/gopath/src/github.com/hyperledger/caliper# ls
    benchmark CONTRIBUTING.md docs LICENSE network node_modules package.json README.md scripts src test
    root@vm10-210-0-10:/opt/gopath/src/github.com/hyperledger/caliper# npm install fabric-ca-client@1.1.0 fabric-client@1.1.0

dtrace-provider@0.8.6 install /opt/gopath/src/github.com/hyperledger/caliper/node_modules/dtrace-provider
node-gyp rebuild || node suppress-error.js

gyp info it worked if it ends with ok
gyp verb cli [ '/usr/bin/nodejs', '/usr/bin/node-gyp', 'rebuild' ]
gyp info using node-gyp@3.0.3
gyp info using node@4.2.6 | linux | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb which succeeded python2 /usr/bin/python2
gyp verb check python version python2 -c "import platform; print(platform.python_version());" returned: "2.7.12\n"
gyp verb get node dir no --target version specified, falling back to host node version: 4.2.6
gyp verb build dir attempting to create "build" dir: /opt/gopath/src/github.com/hyperledger/caliper/node_modules/dtrace-provider/build
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/opt/gopath/src/github.com/hyperledger/caliper/node_modules/dtrace-provider/build'
gyp ERR! stack at Error (native)
gyp ERR! System Linux 4.4.0-62-generic
gyp ERR! command "/usr/bin/nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /opt/gopath/src/github.com/hyperledger/caliper/node_modules/dtrace-provider
gyp ERR! node -v v4.2.6
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
sh: 1: node: Permission denied

pkcs11js@1.0.15 install /opt/gopath/src/github.com/hyperledger/caliper/node_modules/pkcs11js
node-gyp rebuild

gyp info it worked if it ends with ok
gyp verb cli [ '/usr/bin/nodejs', '/usr/bin/node-gyp', 'rebuild' ]
gyp info using node-gyp@3.0.3
gyp info using node@4.2.6 | linux | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb which succeeded python2 /usr/bin/python2
gyp verb check python version python2 -c "import platform; print(platform.python_version());" returned: "2.7.12\n"
gyp verb get node dir no --target version specified, falling back to host node version: 4.2.6
gyp verb build dir attempting to create "build" dir: /opt/gopath/src/github.com/hyperledger/caliper/node_modules/pkcs11js/build
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/opt/gopath/src/github.com/hyperledger/caliper/node_modules/pkcs11js/build'
gyp ERR! stack at Error (native)
gyp ERR! System Linux 4.4.0-62-generic
gyp ERR! command "/usr/bin/nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /opt/gopath/src/github.com/hyperledger/caliper/node_modules/pkcs11js
gyp ERR! node -v v4.2.6
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: dtrace-provider@0.8.6 (node_modules/dtrace-provider):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: dtrace-provider@0.8.6 install: node-gyp rebuild || node suppress-error.js
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: spawn ENOENT

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! pkcs11js@1.0.15 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pkcs11js@1.0.15 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2018-05-29T02_28_37_750Z-debug.log
root@vm10-210-0-10:/opt/gopath/src/github.com/hyperledger/caliper# node -v
v8.11.2
root@vm10-210-0-10:/opt/gopath/src/github.com/hyperledger/caliper#

@JulienGuo
Copy link
Author

root@vm10-210-0-10:/opt/gopath/src/github.com/hyperledger/caliper# node-gyp rebuild
gyp info it worked if it ends with ok
gyp info using node-gyp@3.6.2
gyp info using node@8.11.2 | linux | x64
gyp http GET https://nodejs.org/download/release/v8.11.2/node-v8.11.2-headers.tar.gz
gyp http 200 https://nodejs.org/download/release/v8.11.2/node-v8.11.2-headers.tar.gz
gyp http GET https://nodejs.org/download/release/v8.11.2/SHASUMS256.txt
gyp http 200 https://nodejs.org/download/release/v8.11.2/SHASUMS256.txt
gyp info spawn /usr/bin/python2
gyp info spawn args [ '/root/.nvm/versions/node/v8.11.2/lib/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/opt/gopath/src/github.com/hyperledger/caliper/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/root/.nvm/versions/node/v8.11.2/lib/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/root/.node-gyp/8.11.2/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/root/.node-gyp/8.11.2',
gyp info spawn args '-Dnode_gyp_dir=/root/.nvm/versions/node/v8.11.2/lib/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/root/.node-gyp/8.11.2/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/opt/gopath/src/github.com/hyperledger/caliper',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.' ]
gyp: binding.gyp not found (cwd: /opt/gopath/src/github.com/hyperledger/caliper) while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: gyp failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/root/.nvm/versions/node/v8.11.2/lib/node_modules/node-gyp/lib/configure.js:336:16)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Linux 4.4.0-62-generic
gyp ERR! command "/root/.nvm/versions/node/v8.11.2/bin/node" "/root/.nvm/versions/node/v8.11.2/bin/node-gyp" "rebuild"
gyp ERR! cwd /opt/gopath/src/github.com/hyperledger/caliper
gyp ERR! node -v v8.11.2
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
root@vm10-210-0-10:/opt/gopath/src/github.com/hyperledger/caliper# node-gyp -v
v3.6.2

@haojun
Copy link
Contributor

haojun commented May 30, 2018

@JulienGuo
Copy link
Author

solved :
1、do not use root user
2、install node-gyp in global way . Such as install in ubuntu : sudo apt-get install node-gyp

@shaiknoorahamed
Copy link

I am facing the same issue..

C:\Users\NoorShaik\Downloads\softwares\callforcode\global-citizen\node_modules\pkcs11js>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
Traceback (most recent call last):
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\gyp_main.py", line 16, in
sys.exit(gyp.script_main())
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp_init_.py", line 545, in script_main
return main(sys.argv[1:])
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp_init_.py", line 538, in main
return gyp_main(args)
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp_init_.py", line 514, in gyp_main
options.duplicate_basename_check)
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp_init_.py", line 98, in Load
generator.CalculateVariables(default_variables, params)
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\generator\msvs.py", line 1916, in CalculateVariables
generator_flags.get('msvs_version', 'auto'))
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\MSVSVersion.py", line 434, in SelectVisualStudioVersion
versions = _DetectVisualStudioVersions(version_map[version], 'e' in version)
KeyError: '2014'
gyp ERR! configure error
gyp ERR! stack Error: gyp failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:336:16)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Windows_NT 10.0.16299
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\NoorShaik\Downloads\softwares\callforcode\global-citizen\node_modules\pkcs11js
gyp ERR! node -v v8.10.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN global-citizens-network@0.0.1 No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! pkcs11js@1.0.15 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pkcs11js@1.0.15 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants