Can't install CURL on Ubuntu 18.4LTS (libcurl4 required) but installing it remove libcurl3 and thus mongo not working properly Can't install CURL on Ubuntu 18.4LTS (libcurl4 required) but installing it remove libcurl3 and thus mongo not working properly curl curl

Can't install CURL on Ubuntu 18.4LTS (libcurl4 required) but installing it remove libcurl3 and thus mongo not working properly


You have to do some custom things in order to run mongodb 4.0 in ubuntu 18.10

sudo apt-get install libcurl3

locate libcurl3 file likely in /usr/lib/x86_64-linux-gnu/, make a LD_LIBRARY folder in home, copy the libcurl.so.4 there and rename to libcurl.so.3

 mkdir ~/LD_LIBRARY cp /usr/lib/x86_64-linux-gnu/libcurl.so.4 ~/LD_LIBRARY/ mv ~/LD_LIBRARY/libcurl.so.4 ~/LD_LIBRARY/libcurl.so.3

make a link of libcurl3 by:

cd ~/LD_LIBRARYln -s libcurl.so.3 libcurl.so.4echo "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:~/LD_LIBRARY/" >> ~/.bashrcsource ~/.bashrc

now start mongod it will run.

Also now you can install

sudo apt-get install libcurl4 php-curl

And use all the application require php-curl and libcurl4


Here is How I solve curl installation error:

First I install required version of libcurl4 on which curl depends:

 sudo apt-get install curl

This command give error that

 curl : Depends: libcurl4 (= 7.58.0-2ubuntu3.8ppa2) but it is not going to be installed

I first install libcurl4 required version which in my case is libcurl4-7.58.0-2ubuntu3.8ppa2 note in your case it my differ:

sudo apt-get install libcurl4=7.58.0-2ubuntu3.8ppa2

After installation of libcurl4 I install curl which get installed and work fine:

sudo apt-get install curl