Install PHP modules with Multi-PHP

I’m attempting to install xml_rpc with multi-php. The version I need to install it on is 7.3, but trying to use “apt install php7.3-xmlrpc” wants to install a lot of additional extensions which already exist as modules:

The following additional packages will be installed:
libapache2-mod-php7.3 libxmlrpc-epi0 php7.3-bcmath php7.3-bz2 php7.3-cli php7.3-common php7.3-curl php7.3-fpm php7.3-gd php7.3-imap php7.3-intl php7.3-json php7.3-ldap php7.3-mbstring
php7.3-mysql php7.3-opcache php7.3-pspell php7.3-readline php7.3-soap php7.3-xml php7.3-zip

I’ve tried “update-alternatives --set php /usr/bin/php7.3” but this has made no difference.

Any thoughts on what I can do, or where I’m going wrong?

Hmm, probaly a dependency related issue, can you check them with: apt-cache rdepends php7.3-xmrpc

Doesn’t look like a dependency issue :confused: It might be related to the PPA?

apt-cache rdepends php7.3-xmlrpc
Reverse Depends:

apt-cache depends php7.3-xmlrpc
Depends: php-common
Depends: ucf
Depends: php7.3-common
Depends: libc6
Depends: libxmlrpc-epi0

php -v
PHP (cli) (built: Nov 28 2019 07:37:16) ( NTS )
Copyright © 1997-2018 The PHP Group
Zend Engine v3.3.12, Copyright © 1998-2018 Zend Technologies
with Zend OPcache, Copyright © 1999-2018, by Zend Technologies

php -i | grep extension_dir
extension_dir => /usr/lib/php/20180731 => /usr/lib/php/20180731

[email protected]:/usr/lib/php/20180731# ls

apt list --installed | grep php

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

hestia-php/bionic,now 7.3.11 amd64 [installed]
libapache2-mod-php/now all [installed,upgradable to:]
libapache2-mod-php7.3/now amd64 [installed,upgradable to:]
php/now all [installed,upgradable to:]
php-apcu/now amd64 [installed,upgradable to:]
php-apcu-bc/bionic,now amd64 [installed,automatic]
php-auth-sasl/bionic,bionic,now 1.0.6-3 all [installed,automatic]
php-cache-lite/bionic,bionic,now 1.7.16-2ubuntu1 all [installed,automatic]
php-common/now all [installed,upgradable to:]
php-http-request2/bionic,bionic,now 2.3.0-1ubuntu1 all [installed,automatic]
php-imap/now all [installed,upgradable to:]
php-ldap/now all [installed,upgradable to:]
php-mail-mime/bionic,bionic,now 1.10.2-0.1 all [installed,automatic]
php-net-sieve/bionic,bionic,now 1.4.1-1 all [installed,automatic]
php-net-smtp/bionic,bionic,now 1.8.0-1 all [installed,automatic]
php-net-socket/bionic,bionic,now 1.0.14-2 all [installed,automatic]
php-net-url2/bionic,bionic,now 2.2.1-0.1 all [installed,automatic]
php-pear/bionic,bionic,now all [installed,automatic]
php-php-gettext/bionic,bionic,now 1.0.12-0.1 all [installed,automatic]
php-phpseclib/bionic,bionic,now 2.0.9-1 all [installed,automatic]
php-tcpdf/bionic,bionic,now 6.2.13+dfsg-1ubuntu1 all [installed,automatic]
php-xml-rpc2/bionic,bionic,now 1.1.3-0.1 all [installed]
php5.6-bcmath/now amd64 [installed,upgradable to:]
php5.6-bz2/now amd64 [installed,upgradable to:]
php5.6-cli/now amd64 [installed,upgradable to:]
php5.6-common/now amd64 [installed,upgradable to:]
php5.6-curl/now amd64 [installed,upgradable to:]
php5.6-fpm/now amd64 [installed,upgradable to:]
php5.6-gd/now amd64 [installed,upgradable to:]
php5.6-intl/now amd64 [installed,upgradable to:]
php5.6-json/now amd64 [installed,upgradable to:]
php5.6-mbstring/now amd64 [installed,upgradable to:]
php5.6-mcrypt/now amd64 [installed,upgradable to:]
php5.6-mysql/now amd64 [installed,upgradable to:]
php5.6-opcache/now amd64 [installed,upgradable to:]
php5.6-pspell/now amd64 [installed,upgradable to:]
php5.6-readline/now amd64 [installed,upgradable to:]
php5.6-soap/now amd64 [installed,upgradable to:]
php5.6-xml/now amd64 [installed,upgradable to:]
php5.6-zip/now amd64 [installed,upgradable to:]
php7.0-bcmath/now amd64 [installed,upgradable to:]
php7.0-bz2/now amd64 [installed,upgradable to:]
php7.0-cli/now amd64 [installed,upgradable to:]
php7.0-common/now amd64 [installed,upgradable to:]
php7.0-curl/now amd64 [installed,upgradable to:]
php7.0-fpm/now amd64 [installed,upgradable to:]
php7.0-gd/now amd64 [installed,upgradable to:]
php7.0-intl/now amd64 [installed,upgradable to:]
php7.0-json/now amd64 [installed,upgradable to:]
php7.0-mbstring/now amd64 [installed,upgradable to:]
php7.0-mcrypt/now amd64 [installed,upgradable to:]
php7.0-mysql/now amd64 [installed,upgradable to:]
php7.0-opcache/now amd64 [installed,upgradable to:]
php7.0-pspell/now amd64 [installed,upgradable to:]
php7.0-readline/now amd64 [installed,upgradable to:]
php7.0-soap/now amd64 [installed,upgradable to:]
php7.0-xml/now amd64 [installed,upgradable to:]
php7.0-zip/now amd64 [installed,upgradable to:]
php7.1-bcmath/now amd64 [installed,upgradable to:]
php7.1-bz2/now amd64 [installed,upgradable to:]
php7.1-cli/now amd64 [installed,upgradable to:]
php7.1-common/now amd64 [installed,upgradable to:]
php7.1-curl/now amd64 [installed,upgradable to:]
php7.1-fpm/now amd64 [installed,upgradable to:]
php7.1-gd/now amd64 [installed,upgradable to:]
php7.1-intl/now amd64 [installed,upgradable to:]
php7.1-json/now amd64 [installed,upgradable to:]
php7.1-mbstring/now amd64 [installed,upgradable to:]
php7.1-mcrypt/now amd64 [installed,upgradable to:]
php7.1-mysql/now amd64 [installed,upgradable to:]
php7.1-opcache/now amd64 [installed,upgradable to:]
php7.1-pspell/now amd64 [installed,upgradable to:]
php7.1-readline/now amd64 [installed,upgradable to:]
php7.1-soap/now amd64 [installed,upgradable to:]
php7.1-xml/now amd64 [installed,upgradable to:]
php7.1-zip/now amd64 [installed,upgradable to:]
php7.2-bcmath/now amd64 [installed,upgradable to:]
php7.2-bz2/now amd64 [installed,upgradable to:]
php7.2-cli/now amd64 [installed,upgradable to:]
php7.2-common/now amd64 [installed,upgradable to:]
php7.2-curl/now amd64 [installed,upgradable to:]
php7.2-fpm/now amd64 [installed,upgradable to:]
php7.2-gd/now amd64 [installed,upgradable to:]
php7.2-intl/now amd64 [installed,upgradable to:]
php7.2-json/now amd64 [installed,upgradable to:]
php7.2-mbstring/now amd64 [installed,upgradable to:]
php7.2-mysql/now amd64 [installed,upgradable to:]
php7.2-opcache/now amd64 [installed,upgradable to:]
php7.2-pspell/now amd64 [installed,upgradable to:]
php7.2-readline/now amd64 [installed,upgradable to:]
php7.2-soap/now amd64 [installed,upgradable to:]
php7.2-xml/now amd64 [installed,upgradable to:]
php7.2-zip/now amd64 [installed,upgradable to:]
php7.3/bionic,bionic,now all [installed,automatic]
php7.3-bcmath/now amd64 [installed,upgradable to:]
php7.3-bz2/now amd64 [installed,upgradable to:]
php7.3-cli/now amd64 [installed,upgradable to:]
php7.3-common/now amd64 [installed,upgradable to:]
php7.3-curl/now amd64 [installed,upgradable to:]
php7.3-fpm/now amd64 [installed,upgradable to:]
php7.3-gd/now amd64 [installed,upgradable to:]
php7.3-imap/now amd64 [installed,upgradable to:]
php7.3-intl/now amd64 [installed,upgradable to:]
php7.3-json/now amd64 [installed,upgradable to:]
php7.3-ldap/now amd64 [installed,upgradable to:]
php7.3-mbstring/now amd64 [installed,upgradable to:]
php7.3-mysql/now amd64 [installed,upgradable to:]
php7.3-opcache/now amd64 [installed,upgradable to:]
php7.3-pspell/now amd64 [installed,upgradable to:]
php7.3-readline/now amd64 [installed,upgradable to:]
php7.3-soap/now amd64 [installed,upgradable to:]
php7.3-xml/now amd64 [installed,upgradable to:]
php7.3-zip/now amd64 [installed,upgradable to:]
phpmyadmin/bionic,bionic,now 4:4.6.6-5 all [installed], etc - all of these modules it wants to install already exist! Does Multi-PHP compile its own extensions or grab anything from the HestiaCP repo?

OK… Forget this whole topic! After performing a full “apt upgrade”, I now get:

The following additional packages will be installed:
The following NEW packages will be installed:
libxmlrpc-epi0 php7.3-xmlrpc
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.

Apparently where a package needs an update to another already installed package for dependency apt will list it under “The following additional packages will be installed”. This is a “feature” of ubuntu I was unaware of!

just a wild guess, php7.3-xmlrpc might be not available via the sury repo which most likely would lead to apt trying to install it from the regular ubuntu repo. because this package depends on php7.3-common apt will then have to change that to the ubuntu repo too, as well as all other packages that depend on php7.3-common…

so yes, probably a depency issue AND related to the PPA …

if you need php7.3-xmlrpc I’d suggest to simply let apt have it’s way. the original ubuntu packages might not be as fresh as the sury ones, however they for sure will work the same :wink: