Fail installing moodle on Debian 10 (zip dependency)

Fail installing moodle on Debian 10 (zip dependency)

by Juan Daniel Burró Aláez -
Number of replies: 2

Trying to install moodle on  a fresh Debian 10, moodle 3.8 with php 7.3 , I get this issue:

--

The Zip PHP extension is now required by Moodle, info-ZIP binaries or PclZip library are not used anymore

--

I put all the technical info here:


I'm using docker, my dockerfile is available here: https://github.com/juanda99/moodle-docker-compose/blob/master/moodle/Dockerfile

I install all the extensions using official php 7.3 image based on Debian like this:

--

docker-php-ext-configure gd --with-jpeg-dir=/usr/include/ --with-freetype-dir=/usr/include/

docker-php-ext-configure zip --with-zlib-dir=/usr

docker-php-ext-install -j$(nproc) \
gd \
intl \
mysqli \
soap \
xmlrpc \
zip \
opcache
--

My php configuration with a warning:

----

root@moodle:/var/www/html# php --ini        

PHP Warning:  PHP Startup: Unable to load dynamic library 'zip.so' (tried: /usr/local/lib/php/extensions/no-debug-non-zts-20180731/zip.so (libzip.so.4: cannot open shared object file: No such file or directory), /usr/local/lib/php/extensions/no-debug-non-zts-20180731/zip.so.so (/usr/local/lib/php/extensions/no-debug-non-zts-20180731/zip.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

Configuration File (php.ini) Path: /usr/local/etc/php

Loaded Configuration File:         (none)

Scan for additional .ini files in: /usr/local/etc/php/conf.d

Additional .ini files parsed:      /usr/local/etc/php/conf.d/docker-php-ext-gd.ini,

/usr/local/etc/php/conf.d/docker-php-ext-intl.ini,

/usr/local/etc/php/conf.d/docker-php-ext-mysqli.ini,

/usr/local/etc/php/conf.d/docker-php-ext-opcache.ini,

/usr/local/etc/php/conf.d/docker-php-ext-soap.ini,

/usr/local/etc/php/conf.d/docker-php-ext-sodium.ini,

/usr/local/etc/php/conf.d/docker-php-ext-xmlrpc.ini,

/usr/local/etc/php/conf.d/docker-php-ext-zip.ini,

/usr/local/etc/php/conf.d/opcache-recommended.ini,

/usr/local/etc/php/conf.d/uploads.ini

---

Zip extension configuration:

---

root@moodle:/var/www/html# cat /usr/local/etc/php/conf.d/docker-php-ext-zip.ini 

extension=zip.so

---

zip.so file is located in:

root@moodle:/var/www/html# find / -name "zip.so"

/usr/local/lib/php/extensions/no-debug-non-zts-20180731/zip.so




Average of ratings: -
In reply to Juan Daniel Burró Aláez

Re: Fail installing moodle on Debian 10 (zip dependency)

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Surely this is a Docker question - the Docker extension stuff is failing to load the (correct) php-zip extension? I'm not aware that there's a lot of Docker expertise around here so you may not get a more useful answer.

Except in some very niche applications (I'm looking at you Behat setup!) I've never seen the advantage of Docker vs. all the grief. You'd have been up and running ages ago on a straight Debian install.