I'm sure many of us have needed to run libcurl3 and libcurl4 on Ubuntu 18 for some reason at any point in time.
On Ubuntu 18.04 (Bionic) libcurl3 and libcurl4 cannot coexist. Many third party packages, libraries, etc require libcurl3 while curl itself requires libcurl4.
Please note, this solution is only for precompiled commands (and potentially binaries, not tested). This was tested on a C# binary.
First you'll need to get a copy of libcurl3 and save it to your /usr/lib
directory. You can do that by running:
$ sudo apt-get install libcurl3 -y
$ cp /usr/lib/x86_64-linux-gnu/libcurl.so.3 /usr/lib/
Then remove libcurl3 and reinstall libcurl4:
$ sudo apt-get install libcurl4 libcurl4-openssl-dev -y
Finally prepend env LD_PRELOAD=/usr/lib/libcurl.so.3
to any commands that require libcurl3.
Top comments (13)
I'd also like to add here that it is not necessary to install the libcurl3 package since you can just download it and extract the .so-file you need from there.
This is what I eventually did:
What it does:
libcurl3
directory in your home path and go theredata.tar.xz
from that package archive/usr/lib/libcurl.so.3
(don't mind the.4
suffix, as noted it is actually version 3)After installing libcurl3, /usr/lib/x86_64-linux-gnu/libcurl.so.3 still did not exist
I believe they have just changed the file name as you can see from the libcurl3 package details:
packages.ubuntu.com/bionic/amd64/l...
As confusing as it is, the file is actually named
libcurl.so.4.5.0
. So, after installing libcurl3, this should work:After that, follow the advice in the original post.
It may be a system specific issue, run the find command to locate it.
Happened to me as well, ubuntu 18.04. I'm looking in the /usr/lib directory and the best I got is libcurl-gnutls.so.3
Hmmm thatโs strange, try searching globally for libcurl*.so?
Interestingly enough, there was a libcurl.so.4 in /usr/lib/x86_64-linux-gnu/. Moving that to usr/lib/ and then installing libcurl4 enabled me to run both libcurl3 and libcurl4 programs. Confusing naming convention to be honest :/
Weird (but glad it worked for you) and I agree, itโs totally weird.
Found this at github.com/adobe/brackets/issues/1...
Looks like better solution..
"I just fixed it but had to rebuild the deb package.
Download the .deb installer file
Inside the folder your downloaded the file run dpkg-deb -R ./Brackets.Release.1.12.64-bit.deb Brackets
Edit file Brackets/DEBIAN/control and replace libcurl3 with libcurl4
Rebuild .deb installer running dpkg-deb -b Brackets Brackets-fixed.deb
Install Brackets using the fixed installer running sudo dpkg -i Brackets-fixed.deb
At least the program opens. Don't know if there's anything broken though."
I have my liburl3 at /home/user/libcurl.so.3
Getting "The following packages have unmet dependencies: google-chrome-stable : Depends: libcurl3 but it is not going to be installed" with
sudo env LD_PRELOAD=/home/user/libcurl.so.3
sudo apt install ./chrome64_52.0.2743.116.deb
or
sudo env LD_PRELOAD=/home/user/libcurl.so.3 apt install ./chrome64_52.0.2743.116.deb
Any ideas?
Youโll have to download manually download the Chrome binary. It doesnโt work with apt commands.
any hope or any other info about running both of these simutaneously? The reason being is i want to use both steam and runescape on my linux machine. seems like ill probably be "installing" libcurl3 into a different folder then rerouting runescape to use that folder? To which i would have to ask, where would i find the code to edit such a task?
Helpful, thank you!