mail-in-a-box / mailinabox

Mail-in-a-Box helps individuals take back control of their email by defining a one-click, easy-to-deploy SMTP+everything else server: a mail server in a box.
https://mailinabox.email/
Creative Commons Zero v1.0 Universal
13.74k stars 1.43k forks source link

PHP XSL installation problem #2021

Open cambler-logi opened 2 years ago

cambler-logi commented 2 years ago

After an update to my box, I'm finding that upgrading mailinabox fails when zpush.sh tries to force-install php-xsl

php-xsl is a virtual package, and even though I have it installed for all three versions of PHP on my system (7.2, 7.4 and 8.0, with 7.2 being default because that's what mailinabox wants), the installer now complains that there's no viable install target. Apt informs me that php-xsl is installed, but since the installer for ZPush is doing a force on a virtual package, it can't determine the platform.

It wants a specific prefix version (like php7.2-xsl or, better, php7.2-xml, which installs XSL), or at worst changing php-xsl to php-xml which will resolve, since php-xml is not virtual and brings in php-xsl.

Has anyone else seen this? Am I being oblivious to some apt install problem?

Any adult supervision?

nomandera commented 2 years ago

Your system does not seem to match mine. Have you manually installed two extra versions of PHP?

#  apt list --installed | grep php

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

libawl-php/bionic,bionic,now 0.59-1 all [installed]
php/bionic,bionic,now 1:7.2+60ubuntu1 all [installed]
php-apcu/bionic,now 5.1.9+4.0.11-1build1 amd64 [installed]
php-bcmath/bionic,bionic,now 1:7.2+60ubuntu1 all [installed]
php-cli/bionic,bionic,now 1:7.2+60ubuntu1 all [installed]
php-common/bionic,bionic,now 1:60ubuntu1 all [installed]
php-curl/bionic,bionic,now 1:7.2+60ubuntu1 all [installed]
php-dev/bionic,bionic,now 1:7.2+60ubuntu1 all [installed]
php-fpm/bionic,bionic,now 1:7.2+60ubuntu1 all [installed]
php-gd/bionic,bionic,now 1:7.2+60ubuntu1 all [installed]
php-gmp/bionic,bionic,now 1:7.2+60ubuntu1 all [installed]
php-imagick/bionic-updates,bionic-security,now 3.4.3~rc2-2ubuntu4.1 amd64 [installed]
php-imap/bionic,bionic,now 1:7.2+60ubuntu1 all [installed]
php-intl/bionic,bionic,now 1:7.2+60ubuntu1 all [installed]
php-json/bionic,bionic,now 1:7.2+60ubuntu1 all [installed]
php-ldap/bionic,bionic,now 1:7.2+60ubuntu1 all [installed]
php-mbstring/bionic,bionic,now 1:7.2+60ubuntu1 all [installed]
php-pear/bionic-updates,bionic-updates,bionic-security,bionic-security,now 1:1.10.5+submodules+notgz-1ubuntu1.18.04.4 all [installed]
php-pspell/bionic,bionic,now 1:7.2+60ubuntu1 all [installed]
php-soap/bionic,bionic,now 1:7.2+60ubuntu1 all [installed]
php-sqlite3/bionic,bionic,now 1:7.2+60ubuntu1 all [installed]
php-xml/bionic,bionic,now 1:7.2+60ubuntu1 all [installed]
php-zip/bionic,bionic,now 1:7.2+60ubuntu1 all [installed]
php7.2/bionic-updates,bionic-updates,bionic-security,bionic-security,now 7.2.24-0ubuntu0.18.04.8 all [installed,automatic]
php7.2-bcmath/bionic-updates,bionic-security,now 7.2.24-0ubuntu0.18.04.8 amd64 [installed,automatic]
php7.2-cli/bionic-updates,bionic-security,now 7.2.24-0ubuntu0.18.04.8 amd64 [installed,automatic]
php7.2-common/bionic-updates,bionic-security,now 7.2.24-0ubuntu0.18.04.8 amd64 [installed,automatic]
php7.2-curl/bionic-updates,bionic-security,now 7.2.24-0ubuntu0.18.04.8 amd64 [installed,automatic]
php7.2-dev/bionic-updates,bionic-security,now 7.2.24-0ubuntu0.18.04.8 amd64 [installed,automatic]
php7.2-fpm/bionic-updates,bionic-security,now 7.2.24-0ubuntu0.18.04.8 amd64 [installed,automatic]
php7.2-gd/bionic-updates,bionic-security,now 7.2.24-0ubuntu0.18.04.8 amd64 [installed,automatic]
php7.2-gmp/bionic-updates,bionic-security,now 7.2.24-0ubuntu0.18.04.8 amd64 [installed,automatic]
php7.2-imap/bionic-updates,bionic-security,now 7.2.24-0ubuntu0.18.04.8 amd64 [installed,automatic]
php7.2-intl/bionic-updates,bionic-security,now 7.2.24-0ubuntu0.18.04.8 amd64 [installed,automatic]
php7.2-json/bionic-updates,bionic-security,now 7.2.24-0ubuntu0.18.04.8 amd64 [installed,automatic]
php7.2-ldap/bionic-updates,bionic-security,now 7.2.24-0ubuntu0.18.04.8 amd64 [installed,automatic]
php7.2-mbstring/bionic-updates,bionic-security,now 7.2.24-0ubuntu0.18.04.8 amd64 [installed,automatic]
php7.2-opcache/bionic-updates,bionic-security,now 7.2.24-0ubuntu0.18.04.8 amd64 [installed,automatic]
php7.2-pspell/bionic-updates,bionic-security,now 7.2.24-0ubuntu0.18.04.8 amd64 [installed,automatic]
php7.2-readline/bionic-updates,bionic-security,now 7.2.24-0ubuntu0.18.04.8 amd64 [installed,automatic]
php7.2-soap/bionic-updates,bionic-security,now 7.2.24-0ubuntu0.18.04.8 amd64 [installed,automatic]
php7.2-sqlite3/bionic-updates,bionic-security,now 7.2.24-0ubuntu0.18.04.8 amd64 [installed,automatic]
php7.2-xml/bionic-updates,bionic-security,now 7.2.24-0ubuntu0.18.04.8 amd64 [installed]
php7.2-zip/bionic-updates,bionic-security,now 7.2.24-0ubuntu0.18.04.8 amd64 [installed,automatic]
cambler-logi commented 2 years ago

So note that on your system, you don't have php-xsl shown as installed, since it's a virtual package. It's pulled-in by php-xml. Nominally, the force install on ZPush (in zpush.sh) should/could complain about this.

My 7.2 install looks remarkably like yours. You'll see that I pulled in the php-xsl by hand just to be complete, but a force install doesn't care. It pretends like it's not there (by design)

php7.2/bionic,now 7.2.34-23+ubuntu18.04.1+deb.sury.org+1 all [installed] php7.2-bcmath/bionic,now 7.2.34-23+ubuntu18.04.1+deb.sury.org+1 amd64 [installed] php7.2-cli/bionic,now 7.2.34-23+ubuntu18.04.1+deb.sury.org+1 amd64 [installed,automatic] php7.2-common/bionic,now 7.2.34-23+ubuntu18.04.1+deb.sury.org+1 amd64 [installed,automatic] php7.2-curl/bionic,now 7.2.34-23+ubuntu18.04.1+deb.sury.org+1 amd64 [installed] php7.2-fpm/bionic,now 7.2.34-23+ubuntu18.04.1+deb.sury.org+1 amd64 [installed] php7.2-gd/bionic,now 7.2.34-23+ubuntu18.04.1+deb.sury.org+1 amd64 [installed] php7.2-imap/bionic,now 7.2.34-23+ubuntu18.04.1+deb.sury.org+1 amd64 [installed] php7.2-json/bionic,now 7.2.34-23+ubuntu18.04.1+deb.sury.org+1 amd64 [installed,automatic] php7.2-mbstring/bionic,now 7.2.34-23+ubuntu18.04.1+deb.sury.org+1 amd64 [installed] php7.2-mysql/bionic,now 7.2.34-23+ubuntu18.04.1+deb.sury.org+1 amd64 [installed] php7.2-opcache/bionic,now 7.2.34-23+ubuntu18.04.1+deb.sury.org+1 amd64 [installed,automatic] php7.2-readline/bionic,now 7.2.34-23+ubuntu18.04.1+deb.sury.org+1 amd64 [installed,automatic] php7.2-soap/bionic,now 7.2.34-23+ubuntu18.04.1+deb.sury.org+1 amd64 [installed] php7.2-sqlite3/bionic,now 7.2.34-23+ubuntu18.04.1+deb.sury.org+1 amd64 [installed] php7.2-xml/bionic,now 7.2.34-23+ubuntu18.04.1+deb.sury.org+1 amd64 [installed] php7.2-xsl/bionic,now 7.2.34-23+ubuntu18.04.1+deb.sury.org+1 all [installed] php7.2-zip/bionic,now 7.2.34-23+ubuntu18.04.1+deb.sury.org+1 amd64 [installed]

nomandera commented 2 years ago

Just for completeness although I am not sure if this is expected behavious or not:

# apt list --installed | grep xsl

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

libnginx-mod-http-xslt-filter/bionic-updates,bionic-security,now 1.14.0-0ubuntu1.9 amd64 [installed,automatic]
libxslt1.1/bionic-updates,bionic-security,now 1.1.29-5ubuntu0.2 amd64 [installed]