nodegit: npm install nodegit, gitkraken, CycligentGitTool all fail to install, run, on Linux Mint Cinnamon
When I try to npm install nodegit
, I get (with both node v6.9.1 and v7.7.1):
npm WARN prefer global node-gyp@3.5.0 should be installed with -g
> nodegit@0.18.0 install /home/flow/temp/resolving-issue-nodegit-libcurl/node_modules/nodegit
> node lifecycleScripts/preinstall && node lifecycleScripts/install
[nodegit] Running pre-install script
[nodegit] Configuring libssh2.
{ Error: Command failed: /home/flow/temp/resolving-issue-nodegit-libcurl/node_modules/nodegit/vendor/libssh2/configure --with-libssl-prefix=/home/flow/temp/resolving-issue-nodegit-libcurl/node_modules/nodegit/vendor/openssl/openssl
/home/flow/temp/resolving-issue-nodegit-libcurl/node_modules/nodegit/vendor/libssh2/missing: Unknown `--is-lightweight' option
Try `/home/flow/temp/resolving-issue-nodegit-libcurl/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
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 Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
killed: false,
code: 1,
signal: null,
cmd: '/home/flow/temp/resolving-issue-nodegit-libcurl/node_modules/nodegit/vendor/libssh2/configure --with-libssl-prefix=/home/flow/temp/resolving-issue-nodegit-libcurl/node_modules/nodegit/vendor/openssl/openssl' }
/home/flow/temp/resolving-issue-nodegit-libcurl/node_modules/nodegit/vendor/libssh2/missing: Unknown `--is-lightweight' option
Try `/home/flow/temp/resolving-issue-nodegit-libcurl/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: /home/flow/temp/resolving-issue-nodegit-libcurl/node_modules/nodegit/vendor/libssh2/configure --with-libssl-prefix=/home/flow/temp/resolving-issue-nodegit-libcurl/node_modules/nodegit/vendor/openssl/openssl
/home/flow/temp/resolving-issue-nodegit-libcurl/node_modules/nodegit/vendor/libssh2/missing: Unknown `--is-lightweight' option
Try `/home/flow/temp/resolving-issue-nodegit-libcurl/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
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 Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
killed: false,
code: 1,
signal: null,
cmd: '/home/flow/temp/resolving-issue-nodegit-libcurl/node_modules/nodegit/vendor/libssh2/configure --with-libssl-prefix=/home/flow/temp/resolving-issue-nodegit-libcurl/node_modules/nodegit/vendor/openssl/openssl' }
npm WARN resolving-issue-nodegit-libcurl@1.0.0 No description
npm WARN resolving-issue-nodegit-libcurl@1.0.0 No repository field.
npm ERR! Linux 4.4.0-62-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "--save" "nodegit"
npm ERR! node v6.9.1
npm ERR! npm v3.10.8
npm ERR! code ELIFECYCLE
npm ERR! nodegit@0.18.0 install: `node lifecycleScripts/preinstall && node lifecycleScripts/install`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the nodegit@0.18.0 install script 'node lifecycleScripts/preinstall && node lifecycleScripts/install'.
In related news (https://github.com/electron/electron/issues/8853), both gitkraken and Cycligent Git Tool refuse to run, and in both cases, nodegit
being unable to load libcurl.so.4
would appear to be the point of failure:
/usr/lib ► gitkraken
Node started time: 1488472940858
libcurl.so.4: cannot open shared object file: No such file or directory
Error: libcurl.so.4: cannot open shared object file: No such file or directory
at Error (native)
at process.module.(anonymous function) [as dlopen] (ELECTRON_ASAR.js:158:20)
at Object.Module._extensions..node (module.js:568:18)
at Object.module.(anonymous function) [as .node] (ELECTRON_ASAR.js:169:18)
at Module.load (module.js:456:32)
at tryModuleLoad (module.js:415:12)
at Function.Module._load (module.js:407:3)
at Module.require (module.js:466:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/usr/share/gitkraken/resources/app.asar/node_modules/nodegit/dist/nodegit.js:11:12)
at Module._compile (module.js:541:32)
...
This is on Linux Mint Cinnamon:
► uname -a && cat /etc/issue
Linux enceladus 4.4.0-62-generic #83-Ubuntu SMP Wed Jan 18 14:10:15 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
Linux Mint 18 Sarah
About this issue
- Original URL
- State: open
- Created 7 years ago
- Reactions: 5
- Comments: 26 (6 by maintainers)
To solve this on Fedora create a symbolic link with name ‘libcurl-gnutls.so.4’ in your lib folder, in my case:
sudo ln -s /usr/lib64/libcurl.so.4 /usr/lib64/libcurl-gnutls.so.4
make sur you have libcurl installed first of course 😃
Is there anyway to get this fixed? All Fedora users have to create a system level symlink to run an application that uses nodegit. I can’t be having non-technical users create symlinks. That’s completely unreasonable.
I have this issue on Fedora26 with GitKraken
curl and libcurl were already installed & updated
curl-7.53.1-10.fc26 libcurl-7.53.1-10.fc26
https://github.com/electron/electron/issues/8853 has a solution (works on Linux Mint Cinnamon):
sudo apt-get install curl libcurl3
I think the documentation should be updated.
It’s really unacceptable to require users to create a system-level symlink. Can we please do something about this? The problem is that the precompiled binaries are being made on Ubuntu, which seems to be the only distribution on the planet that links to libcurl-gnutls.so.4 instead of libcurl.so.4.
Centos 7, same bug, @johnpoth solution with symlink works.