nodegit: Can't install via NPM
Am I missing something? Any tips how to get around this? It just started happening.
> nodegit@0.16.0 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' }
myproj-server@1.0.0 /Users/superman/Sites/myproj
└── (empty)
npm WARN EPACKAGEJSON myproj-server@1.0.0 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! 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 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
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 15
- Comments: 35 (6 by maintainers)
Commits related to this issue
- Try a fix from a GitHub issue https://github.com/nodegit/nodegit/issues/1134#issuecomment-569866819 — committed to studiopress/genesis-custom-blocks by kienstra 4 years ago
Latest Xcode just straight up broke things all across the world. Try running
sudo xcode-select --install
and update the xcode CLT. That fixed it for me.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 #728This fix worked for me on macOS Sierra, but after upgrading to macOS Mojave this fix does not work anymore.
brew install libgcrypt
did 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, exceptlibgcrypt
is installed with brew.Should documentation be updated for this? Better yet, is there a node crypto library that
nodegit
could fall back on iflibssl-dev
isn’t present?yum groupinstall "Development tools"
no workie on Amazon Linux.yum install openssl-devel
DID work on Amazon Linux! Yaye!On Ubuntu 18.04 I got the error:
my solution was:
Happens for me as well on Mac OS Sierra 10.12.1.
sudo xcode-select --install
gives me:App Store tells me XCode is up to date though.
Thanks man!
Yeah one of the major os versions made that insufficient (El Capitan maybe? Yosemite? I don’t recall).
Can you try installing
nodegit@0.23.0-alpha.1
?On Ubuntu 16.04, I was able to
sudo apt-get install libssl-dev
to 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-dev
and the thing managed to finally install.I’m trying to get this to run on CentOS and am running into the same issue. I can’t install libssl-dev because it doesn’t exist for CentOS, and installing openssl-devel does not fix the problem. I’d love to use NodeGit, but this is obviously a blocker =/.
EDIT: The fix for CentOS is to run
yum groupinstall "Development tools"
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.
installing libssl-dev on ubuntu 16.10 also solved problem for me.