Skip to content
Advertisement

Can not install php7.4-soap on Debian 9

I am using Debian 9, and I recently upgraded PHP from 5.6 to 7.4. I was hit by the

Class ‘SoapClient’ not found

error when running an old PHP script, which worked very well under PHP 5.6. The phpinfo() lists “SOAP” module but it doesn’t have a dedicated “soap” section with “Soap Client” listed (as mentioned here).

I believe the problem is that I have not installed the php7.4-soap extension, so I run sudo apt-get install php7.4-soap, but I got these errors:

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:
 php7.4-soap : Depends: php7.4-common (= 7.4.20-1+ubuntu21.04.1+deb.sury.org+1) but 7.4.16-1+0~20210305.42+debian9~1.gbpbbe65e is to be installed
               Depends: libc6 (>= 2.33) but 2.24-11+deb9u4 is to be installed
E: Unable to correct problems, you have held broken packages.

I also tried installing php7.4-common manually, but the installation failed with these errors:

 php7.4-common : Depends: libc6 (>= 2.33) but 2.24-11+deb9u4 is to be installed
                 Depends: libffi8ubuntu1 (>= 3.4~20200819) but it is not installable
E: Unable to correct problems, you have held broken packages.

How can I resolve this kind of problem? Thank you.

My output of grep -Rn --include=*.list ^[^#] /etc/apt/ is:

/etc/apt/sources.list.d/mysql.list:4:deb http://repo.mysql.com/apt/debian/ stretch mysql-apt-config
/etc/apt/sources.list.d/mysql.list:5:deb http://repo.mysql.com/apt/debian/ stretch mysql-5.6
/etc/apt/sources.list.d/mysql.list:6:deb http://repo.mysql.com/apt/debian/ stretch mysql-tools
/etc/apt/sources.list.d/mysql.list:8:deb-src http://repo.mysql.com/apt/debian/ stretch mysql-5.6
/etc/apt/sources.list.d/dotdeb.list:1:deb http://packages.dotdeb.org wheezy-php56 all
/etc/apt/sources.list.d/dotdeb.list:2:deb-src http://packages.dotdeb.org wheezy-php56 all
/etc/apt/sources.list.d/php.list:1:deb https://packages.sury.org/php/ stretch main
/etc/apt/sources.list:17:deb http://mirrors.linode.com/debian stretch main
/etc/apt/sources.list:18:deb-src http://mirrors.linode.com/debian stretch main
/etc/apt/sources.list:20:deb http://mirrors.linode.com/debian-security/ stretch/updates main
/etc/apt/sources.list:21:deb-src http://mirrors.linode.com/debian-security/ stretch/updates main
/etc/apt/sources.list:24:deb http://mirrors.linode.com/debian stretch-updates main
/etc/apt/sources.list:25:deb-src http://mirrors.linode.com/debian stretch-updates main

Advertisement

Answer

On debian the php7.4-soap is available for bullseye and sid.

On debian Stretch, you can install php7.4-soap from Sury repo:

sudo apt install apt-transport-https software-properties-common lsb-release ca-certificates
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" sudo tee /etc/apt/sources.list.d/php.list
wget -qO - https://packages.sury.org/php/apt.gpg | sudo apt-key add -
sudo apt update
sudo apt install php7.4-soap
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement