Repository navigation
Closed
Description
Am I missing something? Any tips how to get around this? It just started happening.
> [email protected] install /Users/superman/Sites/myproj/node_modules/nodegit
> node lifecycleScripts/preinstall && node lifecycleScripts/install
[nodegit] Running pre-install script
[nodegit] Configuring libssh2.
{ [Error: Command failed: /bin/sh -c /Users/superman/Sites/myproj/node_modules/nodegit/vendor/libssh2/configure --with-libssl-prefix=/Users/superman/Sites/myproj/node_modules/nodegit/vendor/openssl/openssl
/Users/superman/Sites/myproj/node_modules/nodegit/vendor/libssh2/missing: Unknown `--is-lightweight' option
Try `/Users/superman/Sites/myproj/node_modules/nodegit/vendor/libssh2/missing --help' for more information
configure: WARNING: 'missing' script is too old or missing
configure: error: No crypto library found!
Try --with-libssl-prefix=PATH
or --with-libgcrypt-prefix=PATH
or --with-wincng on Windows
]
killed: false,
code: 1,
signal: null,
cmd: '/bin/sh -c /Users/superman/Sites/myproj/node_modules/nodegit/vendor/libssh2/configure --with-libssl-prefix=/Users/superman/Sites/myproj/node_modules/nodegit/vendor/openssl/openssl' }
/Users/superman/Sites/myproj/node_modules/nodegit/vendor/libssh2/missing: Unknown `--is-lightweight' option
Try `/Users/superman/Sites/myproj/node_modules/nodegit/vendor/libssh2/missing --help' for more information
configure: WARNING: 'missing' script is too old or missing
configure: error: No crypto library found!
Try --with-libssl-prefix=PATH
or --with-libgcrypt-prefix=PATH
or --with-wincng on Windows
[nodegit] ERROR - Could not finish preinstall
{ [Error: Command failed: /bin/sh -c /Users/superman/Sites/myproj/node_modules/nodegit/vendor/libssh2/configure --with-libssl-prefix=/Users/superman/Sites/myproj/node_modules/nodegit/vendor/openssl/openssl
/Users/superman/Sites/myproj/node_modules/nodegit/vendor/libssh2/missing: Unknown `--is-lightweight' option
Try `/Users/superman/Sites/myproj/node_modules/nodegit/vendor/libssh2/missing --help' for more information
configure: WARNING: 'missing' script is too old or missing
configure: error: No crypto library found!
Try --with-libssl-prefix=PATH
or --with-libgcrypt-prefix=PATH
or --with-wincng on Windows
]
killed: false,
code: 1,
signal: null,
cmd: '/bin/sh -c /Users/superman/Sites/myproj/node_modules/nodegit/vendor/libssh2/configure --with-libssl-prefix=/Users/superman/Sites/myproj/node_modules/nodegit/vendor/openssl/openssl' }
[email protected] /Users/superman/Sites/myproj
└── (empty)
npm WARN EPACKAGEJSON [email protected] No repository field.
npm ERR! Darwin 15.6.0
npm ERR! argv "/usr/local/bin/node" "/Users/superman/npm/bin/npm" "install" "nodegit" "--save"
npm ERR! node v4.4.7
npm ERR! npm v3.3.10
npm ERR! code ELIFECYCLE
npm ERR! [email protected] install: `node lifecycleScripts/preinstall && node lifecycleScripts/install`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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 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/superman/Sites/myproj/npm-debug.log
npm ERR! code 1
Reacted by Lyn M, Andreas Kohn, Levi Bostian, Zoltan Kochan, Charlie Martin, Maxim Yaskevich, Marian Klühspies, Tiago Relvao, Sebastien Piquemal, Tea Reggi and 5 more
Metadata
Metadata
Assignees
Labels
No labels
Activity
johnhaley81 commentedon Sep 21, 2016
Latest Xcode just straight up broke things all across the world. Try running
sudo xcode-select --installand update the xcode CLT. That fixed it for me.mitchellmorris commentedon Sep 21, 2016
Thanks man!
WORMSS commentedon Sep 26, 2016
What if you are getting the same error
vendor/libssh2/missing: Unknown --is-lightweight' optionbut do not have xcode-select ??johnhaley81 commentedon Sep 26, 2016
@WORMSS are you on OSX?
codecholeric commentedon Oct 15, 2016
Since this issue popped up first, when I searched for this error:
On Ubuntu 16.04 this problem might be solved by
sudo apt install libssl-dev(thanks to @n8behavior)See #728
e-cloud commentedon Nov 15, 2016
I'm using Ubuntu 16.10, facing the same error. And @codecholeric 's solution works.
danShumway commentedon Nov 16, 2016
Should documentation be updated for this? Better yet, is there a node crypto library that
nodegitcould fall back on iflibssl-devisn't present?WORMSS commentedon Nov 16, 2016
@johnhaley81 no, I was using a Raspberry Pi..
Sorry for big delay, I must have missed your reply.
SkeLLLa commentedon Nov 22, 2016
Same bug on gentoo linux.
romandecker commentedon Nov 24, 2016
Happens for me as well on Mac OS Sierra 10.12.1.
sudo xcode-select --installgives me:App Store tells me XCode is up to date though.
samiraguiar commentedon Feb 11, 2017
@DEX3 just had this problem on Sierra. Had to uninstall node and homebrew, then reinstall homebrew, install node from brew and it worked.
malko commentedon Mar 2, 2017
installing libssl-dev on ubuntu 16.10 also solved problem for me.
jimCresswell commentedon Apr 12, 2017
I want to use NodeGit to build an application that people can install with Docker or
npm -g. That's not going to work in all cases if people need to install extra libraries. As @danShumway asked, is there a way to work around systems missing the crypto libraries? cc @spontemaxkorp commentedon Apr 18, 2017
The issue lies in the fact that it will only use the included openssl if that copy is already built, but that copy is built by the install. Something of a chicken and egg problem that needs to be resolved first. Haven't quite figured out a way around it yet though. Fixing that will allow it to use the locally included copy and should take care of that issue.
7 remaining items
wiredearp commentedon Dec 20, 2017
On Ubuntu 16.04, I was able to
sudo apt-get install libssl-devto progress somewhat further before I got hit by another error calledcurl/curl.h: No such file or directory, but then Isudo apt-get install libcurl4-openssl-devand the thing managed to finally install.michaelkruglos commentedon Apr 15, 2018
sudo apt install libcurl4-openssl-devfixed the issue for me on Ubuntu 16.04I got the hint from the errors saying:
dvakatsiienko commentedon Sep 26, 2018
This fix worked for me on macOS Sierra, but after upgrading to macOS Mojave this fix does not work anymore.
brew install libgcryptdid fixed this issue though. I will test this a bit alter on clean macOS Mojave clean install. But as for now it looks like that nodegit is not working on Mojave by default, exceptlibgcryptis installed with brew.maxkorp commentedon Sep 28, 2018
Guh, then it's configuring libssh "wrongly" however. But it works.
LinxinS97 commentedon Oct 1, 2018
sudo xcode-select --installis not work for macos 10.14 mojave, it still throwsconfigure: error: No crypto library found!maxkorp commentedon Oct 3, 2018
Yeah one of the major os versions made that insufficient (El Capitan maybe? Yosemite? I don't recall).
Can you try installing
[email protected]?implausible commentedon Oct 4, 2018
Would you please ping me if what @maxkorp suggested has fixed your errors? That would be super awesome! Trying to stay on top of what got fixed and what didn't in our big build change!
RaevLogic commentedon Oct 8, 2018
@maxkorp and @implausible check the nodegit slack. Someone with a similar
configure: error: No crypto library found!problem just installed[email protected]and it fixed the issue for them.maxkorp commentedon Oct 8, 2018
THIS IS GOING TO CLOSE SO MANY ISSUES
RaevLogic commentedon Oct 8, 2018
All hail Steve.
dvakatsiienko commentedon Oct 8, 2018
this is very very wanted for us!
sidtagirisa commentedon Jul 10, 2019
export LDFLAGS="-L/usr/local/opt/openssl/lib"
export CPPFLAGS="-I/usr/local/opt/openssl/include"
Adding these to rc file for allowing compilers to find openssl, solved the issue for me.
Leekao commentedon Jul 30, 2019
I solved this issue by running "sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /" on my macOS.
elviejo79 commentedon Dec 31, 2019
On Ubuntu 18.04
I got the error:
my solution was:
Try a fix from a GitHub issue