New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Electron apps can't find libcurl.so.4 #8853

Closed
loveencounterflow opened this Issue Mar 7, 2017 · 16 comments

Comments

Projects
None yet
@loveencounterflow

loveencounterflow commented Mar 7, 2017

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
@MarshallOfSound

This comment has been minimized.

Member

MarshallOfSound commented Mar 7, 2017

If Atom launches on your machine then I doubt this is an Electron issue rather an issue with these apps not declaring their dependencies correctly.

Can you try installing raw Electron from the releases section on GitHub and see if you can launch that 👍

@loveencounterflow

This comment has been minimized.

loveencounterflow commented Mar 7, 2017

Right now my best guess is with nodegit; let's hope folks over there have a clue what's going on.

@robersongomes

This comment has been minimized.

robersongomes commented Mar 22, 2017

@loveencounterflow
I had the same issue on Linux Mint 18 Cinnamon,
sudo apt-get install curl libcurl3 solved the problem for me.

Credit: http://askubuntu.com/a/893117

@Fabucci

This comment has been minimized.

Fabucci commented Mar 23, 2017

@robersongomes
This worked for me. Many thanks!!!!

@loveencounterflow

This comment has been minimized.

loveencounterflow commented Mar 25, 2017

@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.

@matiasvarela

This comment has been minimized.

matiasvarela commented Apr 29, 2017

@robersongomes worked for me too.! thanks

@KurtJacobson

This comment has been minimized.

KurtJacobson commented Jul 4, 2017

Yep, same issue here. Also solved by: sudo apt-get install curl libcurl3

@mdilg

This comment has been minimized.

mdilg commented Sep 12, 2017

Same to me, solved by: sudo apt-get install curl libcurl3

@rabin-io

This comment has been minimized.

rabin-io commented Oct 4, 2017

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.4 which solved my problem.

[/usr/lib64] # ln -s libcurl.so.4.4.0 libcurl-gnutls.so.4
@joebitcoinorg

This comment has been minimized.

joebitcoinorg commented Jan 14, 2018

Thanks! This worked for me. I was trying to run Agama Desktop Wallet for the KomodoPlatform and when it tried to spawn komodod I was seeing errors about libcurl.so.4 being missing. This was on Ubuntu 16.04 running as a Linux Container atop a Proxmox server running Debian Stretch.

Inside the container I ran:
sudo apt-get install curl libcurl3

Which fixed the problem. Thanks!

@lalaithan

This comment has been minimized.

lalaithan commented Mar 5, 2018

I'm having a similar issue on OpenSUSE Leap 42.3 with the following:

7oe3:~> sudo apt-get install curl libcurl3
[sudo] password for root: 

Loading repository data...
Reading installed packages...
'curl' is already installed.
No update candidate for 'curl-7.37.0-30.1.x86_64'. The highest available version is already installed.
'libcurl3' not found in package names. Trying capabilities.
No provider of 'libcurl3' found.
Resolving package dependencies...

Nothing to do.
@Wilker

This comment has been minimized.

Wilker commented Mar 30, 2018

@rabin-io answer solved my issue on CentOS. Thx

@akontsevich

This comment has been minimized.

akontsevich commented May 10, 2018

On openSUSE:

sudo ln -s /usr/lib64/libcurl.so /usr/lib64/libcurl-gnutls.so.4

@4ndrej

This comment has been minimized.

4ndrej commented May 18, 2018

@akontsevich this works on fedora too

@benwinding

This comment has been minimized.

benwinding commented Aug 6, 2018

I'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.

@hyamanieu

This comment has been minimized.

hyamanieu commented Oct 19, 2018

Since Ubuntu 18.04, installing curl & libcurl3 wont' work as curl requires libcurl4 (and that doesn't help with starting GitKraken). I didn't dig into the error as, as said by @benwinding , the snap works. Don't forget to give the right permissions in the Software Store if you keep your repos outside your home.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment