PHP7.0-curl and MSSQL Tools Incompatibility

I'm trying to install Moodle on Ubuntu 18.04 and connect it to a MSSQL server.

But when i try to install php7.0-curl extension, so moodle can work, the MSSQL Tools and other libs are being deleted cause they support libcurl3 although the latest php7.0-curl has a dependency only with libcurl4.

So when i try to install libcurl4 it removes the packages MSSQL tools and others.

sudo ACCEPT_EULA=Y apt-get -y install msodbcsql mssql-tools
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libpython-stdlib python python-minimal python2.7 python2.7-minimal
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  libcurl3 msodbcsql17
The following packages will be REMOVED:
  libcurl4 libcurl4-openssl-dev php7.0-curl
The following NEW packages will be installed:
  libcurl3 msodbcsql msodbcsql17 mssql-tools

Is there any way to install older php7.0-curl extension so i can keep both MSSQL tools and Moodle happy?

Thanks a lot for your time.


Solution 1:

You need to install previous version of extensions ‘common’ and ‘curl’ for php7.0

wget http://security.ubuntu.com/ubuntu/pool/main/p/php7.0/php7.0-common_7.0.28-0ubuntu0.16.04.1_amd64.deb

wget http://security.ubuntu.com/ubuntu/pool/main/p/php7.0/php7.0-curl_7.0.28-0ubuntu0.16.04.1_amd64.deb


sudo dpkg -i php7.0-common_7.0.28-0ubuntu0.16.04.1_amd64.deb


sudo dpkg -i php7.0-curl_7.0.28-0ubuntu0.16.04.1_amd64.deb