nodegit: `npm install` fails on `lifecycleScripts/preinstall`
When running npm install
on mac os sierra 10.12.1, npm gives me the error
Error: Command failed: /Users/roman/projects/nodegit/vendor/libssh2/configure --with-libssl-prefix=/Users/roman/projects/nodegit/vendor/openssl/openssl
/Users/roman/projects/nodegit/vendor/libssh2/missing: Unknown --is-lightweight option
when it tries to configure libssh2. I’m using an up-to-date version of xcode with CLT installed.
Full error trace:
npm install
> nodegit@0.16.0 install /Users/roman/projects/nodegit
> node lifecycleScripts/preinstall && node lifecycleScripts/install
[nodegit] Running pre-install script
[nodegit] Configuring libssh2.
{ Error: Command failed: /Users/roman/projects/nodegit/vendor/libssh2/configure --with-libssl-prefix=/Users/roman/projects/nodegit/vendor/openssl/openssl
/Users/roman/projects/nodegit/vendor/libssh2/missing: Unknown `--is-lightweight' option
Try `/Users/roman/projects/nodegit/vendor/libssh2/missing --help' for more information
configure: WARNING: 'missing' script is too old or missing
configure: error: in `/Users/roman/projects/nodegit/vendor/libssh2':
configure: error: C compiler cannot create executables
See `config.log' for more details
at ChildProcess.exithandler (child_process.js:206:12)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:877:16)
at Socket.<anonymous> (internal/child_process.js:334:11)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at Pipe._handle.close [as _onclose] (net.js:498:12)
killed: false,
code: 77,
signal: null,
cmd: '/Users/roman/projects/nodegit/vendor/libssh2/configure --with-libssl-prefix=/Users/roman/projects/nodegit/vendor/openssl/openssl' }
/Users/roman/projects/nodegit/vendor/libssh2/missing: Unknown `--is-lightweight' option
Try `/Users/roman/projects/nodegit/vendor/libssh2/missing --help' for more information
configure: WARNING: 'missing' script is too old or missing
configure: error: in `/Users/roman/projects/nodegit/vendor/libssh2':
configure: error: C compiler cannot create executables
See `config.log' for more details
[nodegit] ERROR - Could not finish preinstall
{ Error: Command failed: /Users/roman/projects/nodegit/vendor/libssh2/configure --with-libssl-prefix=/Users/roman/projects/nodegit/vendor/openssl/openssl
/Users/roman/projects/nodegit/vendor/libssh2/missing: Unknown `--is-lightweight' option
Try `/Users/roman/projects/nodegit/vendor/libssh2/missing --help' for more information
configure: WARNING: 'missing' script is too old or missing
configure: error: in `/Users/roman/projects/nodegit/vendor/libssh2':
configure: error: C compiler cannot create executables
See `config.log' for more details
[nodegit] ERROR - Could not finish preinstall
{ Error: Command failed: /Users/roman/projects/nodegit/vendor/libssh2/configure --with-libssl-prefix=/Users/roman/projects/nodegit/vendor/openssl/openssl
/Users/roman/projects/nodegit/vendor/libssh2/missing: Unknown `--is-lightweight' option
Try `/Users/roman/projects/nodegit/vendor/libssh2/missing --help' for more information
configure: WARNING: 'missing' script is too old or missing
configure: error: in `/Users/roman/projects/nodegit/vendor/libssh2':
configure: error: C compiler cannot create executables
See `config.log' for more details
at ChildProcess.exithandler (child_process.js:206:12)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:877:16)
at Socket.<anonymous> (internal/child_process.js:334:11)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at Pipe._handle.close [as _onclose] (net.js:498:12)
killed: false,
code: 77,
signal: null,
cmd: '/Users/roman/projects/nodegit/vendor/libssh2/configure --with-libssl-prefix=/Users/roman/projects/nodegit/vendor/openssl/openssl' }
npm ERR! Darwin 16.1.0
npm ERR! argv "/Users/roman/.nvm/versions/node/v6.9.1/bin/node" "/Users/roman/.nvm/versions/node/v6.9.1/bin/npm" "install"
npm ERR! node v6.9.1
npm ERR! npm v3.10.8
npm ERR! code ELIFECYCLE
npm ERR! nodegit@0.16.0 install: `node lifecycleScripts/preinstall && node lifecycleScripts/install`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the nodegit@0.16.0 install script 'node lifecycleScripts/preinstall && node lifecycleScripts/install'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the nodegit package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node lifecycleScripts/preinstall && node lifecycleScripts/install
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs nodegit
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls nodegit
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/roman/projects/nodegit/npm-debug.log
About this issue
- Original URL
- State: open
- Created 8 years ago
- Reactions: 19
- Comments: 15
for me, reinstalling brew and doing
brew install libgcrypt
solved itCan anyone who’s also on Mac OS Sierra confirm this issue? I’d really like to know whether I’m alone here.
Managed to solve it! Turns out the warning about the
--is-lightweight
option is unrelated to why the configure-script failed. Examiningconfig.log
revealed that it failed when it testedgcc
with a basic c program (gcc failed withcannot find -lSystem
). Runningfixed that for me. The warning about the
--is-lightweight
option still persists however (but it still works).@richadr thx! I am successful!
Seems to still have not solved the problem.