Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Unable to push on Linux with newer versions of libcurl #848

Closed
verkvieto opened this issue May 18, 2017 · 49 comments
Closed

Unable to push on Linux with newer versions of libcurl #848

verkvieto opened this issue May 18, 2017 · 49 comments

Comments

@verkvieto
Copy link

verkvieto commented May 18, 2017

Prerequisites

Description

Unable to push commits on Linux with newer versions of libcurl.

Steps to Reproduce

  1. Open a GitHub repository.
  2. Make a commit.
  3. Try to push.

Expected behavior:

The commit pushes successfully.

Actual behavior:

The push fails.

Reproduces how often:

100% of the time.

Versions

atom --version
Atom    : 1.18.0-beta0
Electron: 1.3.15
Chrome  : 52.0.2743.82
Node    : 6.5.0
apm --version
apm  1.18.1
npm  3.10.10
node 6.9.5 x64
python 3.6.1
git 2.13.0

OS: Arch Linux

Additional Information

Pop-up error message:

Unable to push
git-remote-https: /usr/lib/libcurl.so.4: version `CURL_OPENSSL_3' not found (required by git-remote-https)


Edit by @rsese to mention workaround

From #848 (comment) below:

A workaround you can use is to set LOCAL_GIT_DIRECTORY to your system installation of Git - this worked for me on Ubuntu 18.04:

export LOCAL_GIT_DIRECTORY=/usr
@smashwilson
Copy link
Contributor

Looks like we're still dynamically loading libcurl from git binaries within dugite. @shiftkey, any thoughts on this?

@shiftkey
Copy link
Contributor

shiftkey commented May 18, 2017

@smashwilson not initially. I was chatting with @dscho about this last night, he's given me some thoughts but it seems like A Really Hard Task to put a purely portable Git together for Linux due to the explicit and implicit dependencies.

I've opened desktop/dugite-native#42 to track investigating the libcurl issue. I'm kinda swamped for the next week with conference stuff, but I'll dump some more thoughts in there when I can.

@NormanEdance
Copy link

Any progress/quickfix, guys?

@davidkwast
Copy link

me too, started today on Ubuntu 18.04 with Atom 1.31.1

@git-elliot
Copy link

I've installed some of the libraries but still getting this error

/snap/atom/200/usr/share/atom/resources/app.asar.unpacked/node_modules/dugite/git/libexec/git-core/git-remote-https: /snap/core/current/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.25' not found (required by /usr/lib/x86_64-linux-gnu/libgnutls.so.30)
/snap/atom/200/usr/share/atom/resources/app.asar.unpacked/node_modules/dugite/git/libexec/git-core/git-remote-https: /snap/core/current/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.26' not found (required by /usr/lib/x86_64-linux-gnu/libp11-kit.so.0)

I think dependencies are hard coded and requires the older version to be able to run.

@dscho
Copy link

dscho commented Oct 5, 2018

@parasthekoder indeed, the GLIBC versioning hits you.

One way to work around this is to add (ugly) defines for the versioned symbols. I did this in a different project, a long time ago: https://github.com/imagej/imagej-launcher/blob/master/src/main/include/glibc-compat.h (and I wrote a script to update that header based on a built executable: https://github.com/imagej/imagej-launcher/blob/master/force-glibc-compat.sh

A less hacky way might be to use ELF statifier, as I mentioned elsewhere, but this comes with the big caveat that I have not tried it, and therefore I cannot vouch that it works.

The ball is in your park now, @parasthekoder

@amirhfarzaneh
Copy link

So I think all of ubuntu 18.04 user with the latest update cannot use Atom for GitHub right now.

@daviwil
Copy link
Contributor

daviwil commented Oct 5, 2018

Lemme see if I can squeeze this into the next Atom hotfix. It'll be dependent on whether this doesn't break things on earlier Ubuntu releases.

@schampseix
Copy link

should be work with installing : sudo apt install libcurl3/bionic , its working on my side under ubuntu 18.04

@risangbaskoro
Copy link

should be work with installing : sudo apt install libcurl3/bionic , its working on my side under ubuntu 18.04

I got an output that says
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?

What does this mean?

@schampseix
Copy link

looks like an apt process (update, upgrade or installation) is already in progress

@gabrielctn
Copy link

should be work with installing : sudo apt install libcurl3/bionic , its working on my side under ubuntu 18.04

Thanks ! It worked perfectly for me.

@oliverlj
Copy link

Yes , that work but you have to remove curl.

@risangbaskoro
Copy link

How to remove curl?

@oliverlj
Copy link

It is automatically. Curl need libcurl4 :(

@JakobMiksch
Copy link

sudo apt install libcurl3

sudo apt install libcurl3 also worked for me on Ubuntu 18.04

@rsese
Copy link
Contributor

rsese commented Oct 13, 2018

I think a workaround you can use is to set LOCAL_GIT_DIRECTORY to your system installation of Git - this worked for me on 18.04:

export LOCAL_GIT_DIRECTORY=/usr

I first tried using /usr/bin but I saw this error in console so switched to just /usr:

Error: Git could not be found at the expected path: '/usr/bin/bin/git'.

@davidkwast
Copy link

sudo apt install libcurl3 also worked for me on Ubuntu 18.04

I tried that but it will remove my virtualbox-5.2

I think this is Atom's fault because Ubuntu 18.04 has the biggest Linux userbase. And going back to a older version of a library is not a proper fix. Atom should have this lib embed with it will not supprt the updated versions from now on.

@shiftkey
Copy link
Contributor

@davidkwast the core of the issue is upstream, and it's down to supporting versions of Ubuntu across the libcurl3/libcurl4 divide - desktop/dugite-native#109. Short of building against multiple flavours of Ubuntu (which might just move the pain onto packagers), or exploring a Git distro that statically links to libcurl, we're kind of stuck at the moment.

I'd love some help figuring this out.

@ricpelo
Copy link

ricpelo commented Oct 17, 2018

Any known workaround so we can I use Atom for GitHub on Ubuntu 18.04 without uninstalling curl? Thanks.

@gautamkvashisht
Copy link

gautamkvashisht commented Oct 17, 2018

Also getting the same error in Kali Linux 2018.3. I hope that Atom developers fix this issue in the next update! It's quite annoying as I have to use another Git GUI (SmartGit), even for small projects.

@smashwilson
Copy link
Contributor

@ricpelo @gautamkvashisht did you try @rsese's workaround?

@lcreid
Copy link

lcreid commented Oct 17, 2018

@rsese's workaround worked for me. Atom can push and fetch. curl still works. Vagrant still works.

@jonathonf
Copy link

jonathonf commented Oct 17, 2018

Bundling a dynamically-linked binary which is built against a distro-specific set of libraries seems bananas. One option would be to compile against RHEL6 so you have a sensible baseline target. A better option would be to add git to the package dependencies and use the system git by default (or set LOCAL_GIT_DIRECTORY as an intervening workaround). This also means you benefit from distribution security updates...

@ricpelo
Copy link

ricpelo commented Oct 18, 2018

@ricpelo @gautamkvashisht did you try @rsese's workaround?

Yeah, it works! Thank you very much!

@kunjeshn

This comment has been minimized.

@jonathonf
Copy link

jonathonf commented Oct 18, 2018

@kunjeshn How does installing a third-party package help with fixing an issue with Atom's default bundled software? We don't want another workaround, we want a fix.

@ezewer
Copy link

ezewer commented Oct 19, 2018

@kunjeshn this does not work for me, @rsese work around neither, however i can be executing solution wrongly.
And doing: sudo apt-get install libcurl3
Breaks mongodb 4.0 as it unistalls libcurl4 because libcurl3 and libcurl4 cannot coexist

Removing mongodb-org (4.0.3) ...
Removing mongodb-org-server (4.0.3) ...
Removing php-curl (1:7.2+60ubuntu1) ...
Removing php7.2-curl (7.2.10-0ubuntu0.18.04.1) ...
Removing libcurl4:amd64 (7.58.0-2ubuntu3.3) ...

@gautamkvashisht
Copy link

@ricpelo @gautamkvashisht did you try @rsese's workaround?

Yes. But it didn't work. Still getting the same error.

@gautamkvashisht
Copy link

Also, I would prefer a fix than a workaround because a lot of users are facing this issue.

@shiftkey
Copy link
Contributor

I believe that desktop/dugite-native#129 has addressed the issue deep in the Git tooling, and version 1.79.0 of dugite on NPM contains the new tooling. After that libcurl3 | libcurl4 should be fine to declare as an install dependency.

@smashwilson
Copy link
Contributor

Just a note that we now use dugite@1.79.0 as of #1757.

@daviwil
Copy link
Contributor

daviwil commented Oct 25, 2018

Thanks for getting this fixed @shiftkey!

@daviwil
Copy link
Contributor

daviwil commented Oct 25, 2018

I can confirm that the updated dugite in the GitHub package resolves the issue on Ubuntu 18.04 when libcurl4 is installed, push and pull work fine now. We haven't scheduled an Atom hotfix release yet, but when we do ship one out it will contain this fix.

@ezewer
Copy link

ezewer commented Oct 26, 2018

@daviwil can you help me here, how do i apply this to my current installation?
I updated to atom 1.32.0 and still the same problem
Is there anything else i should do?

@daviwil
Copy link
Contributor

daviwil commented Oct 26, 2018

The only thing you can do right now is apm install atom/github, but beware, this will install the in-development GitHub package from the master branch of its repo so there might be bugs. You'll also need to remember to delete it after we ship a hotfix with this fix included.

@Spitfire1900
Copy link

The workaround no longer works in Ubuntu 18.10 as perhaps to avoid a conflict with libcurl3 libcurl3 has been replaced with libcurl3-gnutls and libcurl-openssl1.0-dev (which depends on libcurl3) has been replaced with libcurl4-openssl-dev (depends libcurl4); /usr/lib/x86_64-linux-gnu/libcurl.so.4 is now owned by package libcurl4.

Error:
/usr/share/atom/resources/app.asar.unpacked/node_modules/dugite/git/libexec/git-core/git-remote-https: /usr/lib/x86_64-linux-gnu/libcurl.so.4: version `CURL_OPENSSL_3' not found (required by /usr/share/atom/resources/app.asar.unpacked/node_modules/dugite/git/libexec/git-core/git-remote-https)

atom --version:

Electron: 2.0.9
Chrome  : 61.0.3163.100
Node    : 8.9.3

apm --version

npm  6.2.0
node 8.9.3 x64
atom 1.32.0
python 2.7.15+
git 2.19.1

apm list | grep github
├── github@0.20.1

lsb_release -a:

Distributor ID: Ubuntu
Description:    Ubuntu 18.10
Release:        18.10
Codename:       cosmic

dpkg -l | grep libcurl:

ii  libcurl3-gnutls:amd64                                       7.61.0-1ubuntu2                             amd64        easy-to-use client-side URL transfer library (GnuTLS flavour)
ii  libcurl4:amd64                                              7.61.0-1ubuntu2                             amd64        easy-to-use client-side URL transfer library (OpenSSL flavour)
ii  python3-pycurl                                              7.43.0.1-0.2build1                          amd64        Python bindings to libcurl (Python 3)

apt-file find /usr/lib/x86_64-linux-gnu/libcurl.so.4

libcurl4: /usr/lib/x86_64-linux-gnu/libcurl.so.4.5.0

Package needs to search for libcurl-gnutls.so.4 or upgrade to libcurl4
apt-file list libcurl3-gnutls

libcurl3-gnutls: /usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4
libcurl3-gnutls: /usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4.5.0
libcurl3-gnutls: /usr/share/doc/libcurl3-gnutls/NEWS.Debian.gz
libcurl3-gnutls: /usr/share/doc/libcurl3-gnutls/changelog.Debian.gz
libcurl3-gnutls: /usr/share/doc/libcurl3-gnutls/copyright
libcurl3-gnutls: /usr/share/lintian/overrides/libcurl3-gnutls

apt-cache show libcurl4-openssl-dev | grep Depends

Depends: libcurl4 (= 7.61.0-1ubuntu2)

@ezewer
Copy link

ezewer commented Oct 28, 2018

@Spitfire1900 till fix is upload to atom i ll recommend to use it as before and when going to push to cloud use console to do it git push this would get all the staged changes and comments that had been done on atom.
I have been trying different things to solve the issue but they end up being more of a head ache that to write a simple line on console. Work around sometimes break when installing new things or updates, etc.

@Spitfire1900
Copy link

Spitfire1900 commented Oct 29, 2018

Looks like this is associated with desktop/dugite-native#109
Which if so this may be resolved with atom/atom#18201
Which appears will be pushed out with v1.34

@daviwil
Copy link
Contributor

daviwil commented Oct 29, 2018

The real fix to this issue is the update to dugite in the GitHub package which we'll include in the 1.32.1 and 1.33.0-beta1 hotfix updates released sometime this week. Thanks for your patience while we get the hotfixes out!

@Spitfire1900
Copy link

I have confirmed that install of debian package output of atom/atom's commit 24d1bcc31's (current 1.32-releases tip) script/build --create-debian-package can do https publish and fetch.

🌮

@rsese
Copy link
Contributor

rsese commented Nov 2, 2018

The real fix to this issue is the update to dugite in the GitHub package which we'll include in the 1.32.1 and 1.33.0-beta1 hotfix updates released sometime this week

1.32.1 and 1.33.0-beta1 have been released ⚡ Going to go ahead and close this but if you're still having issues, please let us know.

@rsese rsese closed this as completed Nov 2, 2018
@Amantel
Copy link

Amantel commented Nov 24, 2018

Atom 1.32.2
Ubuntu 18.04

/snap/atom/206/usr/share/atom/resources/app.asar.unpacked/node_modules/dugite/git/libexec/git-core/git-remote-https: /snap/core/current/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.25' not found (required by /usr/lib/x86_64-linux-gnu/libgnutls.so.30)
/snap/atom/206/usr/share/atom/resources/app.asar.unpacked/node_modules/dugite/git/libexec/git-core/git-remote-https: /snap/core/current/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.26' not found (required by /usr/lib/x86_64-linux-gnu/libp11-kit.so.0)

@rsese
Copy link
Contributor

rsese commented Nov 27, 2018

@Amantel - the Snap installation is unofficial but If you can reproduce the error with a supported installation method, please open a new issue with the template filled out and we'll take a look.

@ecotechie
Copy link

I'm on Kubuntu 18.04 and can't update from Atom 1.33 because of the libcurl3 vs libcurl4 dependencies. Not sure this issue was fixed by: atom/atom#18201

@Spitfire1900
Copy link

@ecotechie as a Kubuntu 18.10 user I can confirm that atom/atom#18201 resolved my issues per above comments from myself.

@ecotechie
Copy link

@Spitfire1900 Yup I can push just fine... My bad. I meant to post this on the issue of not being able to update to newer versions of Atom since it has libcurl3 as a requirement and will therefor remove libcurl4 and any program using it.

@Spitfire1900
Copy link

Per diff atom/atom@812dcc4, libcurl3 or libcurl4 will both satisfy the libcurl dependency of Atom 1.33's *.deb package.

@ecotechie
Copy link

That seems about right, but I can't update to any versions after 1.33. It asks to remove libcurl4 and install libcurl3. Created a ticket in the Atom repo atom/atom#18758

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests