问题
I am trying to install php-soap on my Centos 6.6. I am running PHP 5.4.20. When I do a "yum install php-soap" I get this error:
Loaded plugins: fastestmirror, security
Setting up Install Process
Loading mirror speeds from cached hostfile
* base: centos.openitc.uk
* epel: epel.check-update.co.uk
* extras: centos.openitc.uk
* rpmforge: mirror.nl.leaseweb.net
* updates: centos.openitc.uk
* webtatic: us-east.repo.webtatic.com
Resolving Dependencies
--> Running transaction check
---> Package php-soap.x86_64 0:5.3.3-40.el6_6 will be installed
--> Processing Dependency: php-common(x86-64) = 5.3.3-40.el6_6 for package: php-soap-5.3.3-40.el6_6.x86_64
--> Finished Dependency Resolution
Error: Package: php-soap-5.3.3-40.el6_6.x86_64 (updates)
Requires: php-common(x86-64) = 5.3.3-40.el6_6
Installed: php-common-5.4.20-1.el6.remi.x86_64 (@remi)
php-common(x86-64) = 5.4.20-1.el6.remi
Available: php-common-5.3.3-38.el6.x86_64 (base)
php-common(x86-64) = 5.3.3-38.el6
Available: php-common-5.3.3-40.el6_6.x86_64 (updates)
php-common(x86-64) = 5.3.3-40.el6_6
Available: php54w-common-5.4.36-1.w6.x86_64 (webtatic)
php-common(x86-64) = 5.4.36-1.w6
Available: php54w-common-5.4.37-1.w6.x86_64 (webtatic)
php-common(x86-64) = 5.4.37-1.w6
Available: php54w-common-5.4.38-1.w6.x86_64 (webtatic)
php-common(x86-64) = 5.4.38-1.w6
Available: php55w-common-5.5.20-1.w6.x86_64 (webtatic)
php-common(x86-64) = 5.5.20-1.w6
Available: php55w-common-5.5.21-1.w6.x86_64 (webtatic)
php-common(x86-64) = 5.5.21-1.w6
Available: php55w-common-5.5.22-1.w6.x86_64 (webtatic)
php-common(x86-64) = 5.5.22-1.w6
Available: php56w-common-5.6.4-1.w6.x86_64 (webtatic)
php-common(x86-64) = 5.6.4-1.w6
Available: php56w-common-5.6.5-1.w6.x86_64 (webtatic)
php-common(x86-64) = 5.6.5-1.w6
Available: php56w-common-5.6.6-1.w6.x86_64 (webtatic)
php-common(x86-64) = 5.6.6-1.w6
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
How do I work around it? I have these PHP modules installed:
php-tcpdf-dejavu-sans-fonts-6.2.4-1.el6.noarch
newrelic-php5-4.18.0.89-1.x86_64
php-cli-5.4.20-1.el6.remi.x86_64
php-mcrypt-5.4.20-1.el6.remi.x86_64
php-gd-5.4.20-1.el6.remi.x86_64
phpMyAdmin-4.0.7-1.el6.remi.noarch
php-pear-1.9.4-4.el6.noarch
php-tcpdf-6.2.4-1.el6.noarch
php-common-5.4.20-1.el6.remi.x86_64
php-mbstring-5.4.20-1.el6.remi.x86_64
php-bcmath-5.4.20-1.el6.remi.x86_64
php-pdo-5.4.20-1.el6.remi.x86_64
php-pecl-memcache-3.0.8-1.el6.remi.x86_64
php-php-gettext-1.0.11-3.el6.noarch
newrelic-php5-common-4.18.0.89-1.noarch
php-xml-5.4.20-1.el6.remi.x86_64
php-mysql-5.4.20-1.el6.remi.x86_64
php-recode-5.4.20-1.el6.remi.x86_64
php-tidy-5.4.20-1.el6.remi.x86_64
php-5.4.20-1.el6.remi.x86_64
Is it an idea to remove PHP 5.4 and install PHP 5.3.3? I am not sure if my sites can run PHP 5.5.
Thanks for any suggestions!!
回答1:
I followed the link from @liquidflo and I did this to solve the problem.
Listed all PHP modules installed to make sure I got back everything later
rpm -qa | grep php
I had a mix of modules I think from 5.3 and 5.4 Then I copied all the names of the modules and removed them with
#sudo yum remove php php-mbstring php-mysql php-cli php-gd ...(list all the modules...
Then I did an install of all the removed php modules.
#sudo yum install php php-mbstring php-mysql php-cli php-gd php-soap ...(list all the modules, added php-soap now)...
I am now back on PHP 5.3.3 and php-soap works.
回答2:
Try to download this..
php soap 5.4.16-36 i686
And force installation..
rpm -Uvh php-soap-5.4.16-36.1.el7_2.1.i686.rpm --nodeps
回答3:
It might be the conflict between php version and soap version getting from remi repository,
Below command list the available packages from repository,
yum list php55-*
Here 55 is the php version.
...
php55-php-snmp.x86_64 5.5.38-7.el6.remi remi-safe
php55-php-soap.x86_64 5.5.38-7.el6.remi remi-safe
php55-php-suhosin.x86_64 0.9.38-1.el6.remi remi-safe
...
Find out the relevant package and run it.
yum install php55-php-soap.x86_64
Finally you have to enable the soap module,
find -name soap.so
/opt/remi/php55/root/usr/lib64/php/modules/soap.so
Add the below line into the php.ini file,
extension='/opt/remi/php55/root/usr/lib64/php/modules/soap.so'
Restart the apache server,
sudo service httpd restart
回答4:
Installed: php-common-5.4.20-1.el6.remi.x86_64 (@remi)
You have php 5.4 from "remi" repository, so you need to enable this repository to install additional extension (btw, this will imply an update to latest 5.4.45).
yum --enablerepo=remi install php-soap
You can also permanently enable the php 5.4 repository (or any other version)
yum-config-manager --enable remi-php54
yum install php-soap
Notice: PHP 5.4 is now EOL, and unmaintained by the PHP Project, I strongly you update to a maintained version (5.6, 7, 7.1).
See the Wizard instructions
来源:https://stackoverflow.com/questions/28897816/error-installing-php-soap-on-php-5-4-20-centos-6