简体   繁体   English

在PHP 5.4.20 Centos 6上安装php-soap时出错

[英]Error installing php-soap on PHP 5.4.20 Centos 6

I am trying to install php-soap on my Centos 6.6. 我想在我的Centos 6.6上安装php-soap。 I am running PHP 5.4.20. 我正在运行PHP 5.4.20。 When I do a "yum install php-soap" I get this error: 当我做“yum install php-soap”时,我收到此错误:

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模块:

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? 是否删除PHP 5.4并安装PHP 5.3.3? I am not sure if my sites can run PHP 5.5. 我不确定我的网站是否可以运行PHP 5.5。

Thanks for any suggestions!! 谢谢你的任何建议!!

I followed the link from @liquidflo and I did this to solve the problem. 我跟着@liquidflo的链接,我这样做是为了解决这个问题。

  • Listed all PHP modules installed to make sure I got back everything later 列出所有安装的PHP模块,以确保我以后收到所有内容

    rpm -qa | rpm -qa | grep php 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 我从5.3和5.4开始混合使用模块然后我复制了所有模块的名称并将其删除

#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. 然后我安装了所有删除的php模块。

#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. 我现在回到PHP 5.3.3和php-soap工作。

Try to download this.. 试着下载这个..

php soap 5.4.16-36 i686 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

It might be the conflict between php version and soap version getting from remi repository, 它可能是php版本和从remi存储库获取的soap版本之间的冲突,

Below command list the available packages from repository, 下面的命令列出了存储库中的可用包,

yum list php55-*

Here 55 is the php version. 这里55是php版本。

...
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, 最后你必须启用soap模块,

find -name soap.so
/opt/remi/php55/root/usr/lib64/php/modules/soap.so

Add the below line into the php.ini file, 将以下行添加到php.ini文件中,

extension='/opt/remi/php55/root/usr/lib64/php/modules/soap.so'

Restart the apache server, 重启apache服务器,

sudo service httpd restart
  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). 你有来自“remi”存储库的php 5.4,所以你需要启用这个存储库来安装额外的扩展(顺便说一句,这将暗示对最新的5.4.45的更新)。

yum --enablerepo=remi install php-soap

You can also permanently enable the php 5.4 repository (or any other version) 您还可以永久启用php 5.4存储库(或任何其他版本)

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). 注意: PHP 5.4现在是EOL ,并且不受PHP项目的维护,我强烈地更新为维护版本 (5.6,7,7.1)。

See the Wizard instructions 请参阅向导说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM