Moodle 3.10 install Ubuntu server 20.10 php extensions required

Moodle 3.10 install Ubuntu server 20.10 php extensions required

by Deepak Deshpande -
Number of replies: 5

Hello,

I am trying to install Moodle 3.10 by command line.

My php version is php -v

PHP 7.4.5 (cli) (built: Apr 19 2020 07:36:30) ( NTS )

Copyright (c) The PHP Group

Zend Engine v3.4.0, Copyright (c) Zend Technologies

    with Zend OPcache v7.4.5, Copyright (c), by Zend Technologies

The error is 

php_extension curl !!

[System] must be installed and enabled - The cURL PHP extension is now required by Moodle, in order to communicate

with Moodle repositories.



!! php_extension zip !!

[System] must be installed and enabled - The Zip PHP extension is now required by Moodle, info-ZIP binaries or

PclZip library are not used anymore.



!! php_extension intl !!

[System] must be installed and enabled - Intl extension is required to improve internationalization support, such as

locale aware sorting and international domain names.


I have tried for 3 days to install and remove the errors but am not successful. Please let me know.

Average of ratings: -
In reply to Deepak Deshpande

Re: Moodle 3.10 install Ubuntu server 20.10 php extensions required

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
sudo apt install php-intl php-curl php-zip
sudo service apache2 restart
In reply to Deepak Deshpande

Re: Moodle 3.10 install Ubuntu server 20.10 php extensions required

by Deepak Deshpande -
Thank you . I tried that but there were some errors for php mobilink extensions. Then I ran sudo update and sudo upgrade

Now I cant launch the installer from terminal

sudo -u www-data /usr/bin/php admin/cli/install.php
PHP Warning: PHP Startup: Unable to load dynamic library 'curl.so' (tried: /usr/lib/php/20200930/curl.so (/usr/lib/php/20200930/curl.so: undefined symbol: curl_mime_addpart, version CURL_OPENSSL_4), /usr/lib/php/20200930/curl.so.so (/usr/lib/php/20200930/curl.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Fatal error: Method lang_string::__set_state() must take exactly 1 argument in /var/www/html/moodle/lib/moodlelib.php on line 10664

Fatal error: Method lang_string::__set_state() must take exactly 1 argument in /var/www/html/moodle/lib/moodlelib.php on line 10664
In reply to Deepak Deshpande

Re: Moodle 3.10 install Ubuntu server 20.10 php extensions required

by Leon Stringer -
Picture of Core developers Picture of Particularly helpful Moodlers

Please run /usr/bin/php -v and tell us what it shows. Error "__set_state() must take exactly 1 argument" suggests you have PHP 8.0 which Moodle does not yet support.

I realise you've said you have PHP 7.4.5 but that is a PHP 8.0 error.

In reply to Leon Stringer

Re: Moodle 3.10 install Ubuntu server 20.10 php extensions required

by Deepak Deshpande -
Thank you. You are correct . php version is 8.0.1 now . The version changed when I ran apt update and upgrade
In reply to Deepak Deshpande

Re: Moodle 3.10 install Ubuntu server 20.10 php extensions required

by Deepak Deshpande -
I purged all php 8.0 packages with apt purge php8*.

I croot@localhost:/var/www/html/moodle# sudo apt install php-curl php-mbstring
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
php8.0-mbstring : Depends: libonig5 (>= 6.8.1) but it is not installable
E: Unable to correct problems, you have held broken packagesan launch the installer now. But no joy.


There is no candidate for installation for libonig5,