electron: Electron apps can't find libcurl.so.4
I’m looking for a nice Git GUI, and so I came across gitkraken the other day. However, it wouldn’t start but fail with
/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)
...
I tried to fix the issue with
sudo ln -sf /usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4.4.0 libcurl.so.4
and, as recommended by nodegit:
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install libstdc++-4.9-dev
but to no avail. Naturally I would have thought this to be a problem with the gitkraken app, but today I chose to try and run Cycligent Git Tool, and look what happened:
► /usr/share/CycligentGitTool/CycligentGitTool
A JavaScript error occurred in the main process
Uncaught Exception:
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:173:20)
at Object.Module._extensions..node (module.js:583:18)
at Object.module.(anonymous function) [as .node] (ELECTRON_ASAR.js:173:20)
at Module.load (module.js:473:32)
at tryModuleLoad (module.js:432:12)
at Function.Module._load (module.js:424:3)
at Module.require (module.js:483:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/usr/share/CycligentGitTool/resources/app/cygit/server/node_modules/nodegit-electron-linux-x64/dist/nodegit.js:11:12)
so it would appear Electron has a problem here. The strange thing is that I can start Atom, and I never had a problem like that with it (well, maybe it doesn’t even need libcurl, of course).
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: closed
- Created 7 years ago
- Comments: 18 (1 by maintainers)
@loveencounterflow I had the same issue on Linux Mint 18 Cinnamon,
sudo apt-get install curl libcurl3solved the problem for me.Credit: http://askubuntu.com/a/893117
Thanks to this issue and the comments I was able to solve my problem as well, I’m using gitkraken as well but run it on Fedora which the libcurl naming is a bit different. so I created a new symlink named
libcurl-gnutls.so.4which solved my problem.On openSUSE:
sudo ln -s /usr/lib64/libcurl.so /usr/lib64/libcurl-gnutls.so.4@robersongomes This worked for me. Many thanks!!!
it helped: https://askubuntu.com/questions/1014645/unmet-dependencies-when-trying-to-install-curl-on-ubuntu-16-04
sudo apt install curlI’m running into this problem on Ubuntu 18.04,
To solve this, I just uninstalled and used the Gitkraken Snap from the Ubuntu Software Store.
@rabin-io answer solved my issue on CentOS. Thx
@robersongomes YES!
I dare hereby re-open the commit to encourage adding this—
sudo apt-get install curl libcurl3—to be added to the installation instructions where seen fit.