Upgrade prerequsites admin/environment/php extension/curl

Upgrade prerequsites admin/environment/php extension/curl

by Raivo P -
Number of replies: 3

Hello

We starting our moodle environment upgrade, from 3.1.1 to 3.5 and then from 3.5 to latest.

When checking for plugin updates, there is - "The cURL PHP extension is now required by Moodle, in order to communicate with Moodle repositories". Trying to follow Guidance and running command - "apt-get install git build-essential autoconf libtool libtool-bin php5-curl libbison-dev=1:2.5.dfsg-2.1 libxml2-dev libssl-dev openssl" - I'm getting message:

"Package php5-curl is not available, but is referred to by another package.

This may mean that the package is missing, has been obsoleted, or is only available from another source 

E: Package 'php5-curl' has no installation candidate

E: Version '1:2.5.dfsg-2.1' for 'libbison-dev' was not found"

What i'm missing?

Our env is: 

  • Moodle 3.1.1+ (Build: 20160901)
  • PHP Version7.0.32-0ubuntu0.16.04.1
  • Ubuntu 18.04.1
  • Apache/2.4.29 (Ubuntu)

I must admit, that I'm new with Moodle and Ubuntu administration and would like to get some help from here. Thanks, Raivo 

Average of ratings: -
In reply to Raivo P

Re: Upgrade prerequsites admin/environment/php extension/curl

by Raivo P -
One more thing, if I check /etc/php/ folder, there is 7.0 and 7.2 as well. Although Moodle uses PHP7.0
In reply to Raivo P

Re: Upgrade prerequsites admin/environment/php extension/curl

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
If you run PHP 7.0 why do you request php5-curl? In the Debian environment, you can omit specifying the version for PHP modules, once main PHP version is set. In other words 'apt-get install php-curl'. If you want to be specific, 'apt-get install php7.0-curl'.
In reply to Visvanath Ratnaweera

Re: Upgrade prerequsites admin/environment/php extension/curl

by Raivo P -
Thank you Visvanath, I managed it finally. running 'sudo apt-get install php7.0-curl', gave nothing. Then i run
sudo apt-add-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php7.0-curl
did the work, now I got cURL PHP extension installed, and all checks are green, and I can continue with upgrade. Thanks.