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
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
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Find the answer in similar questions on our website.
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.
PHP (from the English Hypertext Preprocessor - hypertext preprocessor) is a scripting programming language for developing web applications. Supported by most hosting providers, it is one of the most popular tools for creating dynamic websites.
The PHP scripting language has gained wide popularity due to its processing speed, simplicity, cross-platform, functionality and distribution of source codes under its own license.
DBMS is a database management system. It is designed to change, search, add and delete information in the database. There are many DBMSs designed for similar purposes with different features. One of the most popular is MySQL.
It is a software tool designed to work with relational SQL databases. It is easy to learn even for site owners who are not professional programmers or administrators. MySQL DBMS also allows you to export and import data, which is convenient when moving large amounts of information.
Welcome to the Q&A site for web developers. Here you can ask a question about the problem you are facing and get answers from other experts. We have created a user-friendly interface so that you can quickly and free of charge ask a question about a web programming problem. We also invite other experts to join our community and help other members who ask questions. In addition, you can use our search for questions with a solution.
Ask about the real problem you are facing. Describe in detail what you are doing and what you want to achieve.
Our goal is to create a strong community in which everyone will support each other. If you find a question and know the answer to it, help others with your knowledge.