【问题标题】:Error installing php-soap on PHP 5.4.20 Centos 6在 PHP 5.4.20 Centos 6 上安装 php-soap 时出错
【发布时间】:2015-05-08 00:01:09
【问题描述】:

我正在尝试在我的 Centos 6.6 上安装 php-soap。我正在运行 PHP 5.4.20。当我执行“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

我该如何解决?我已经安装了这些 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

是否可以删除 PHP 5.4 并安装 PHP 5.3.3?我不确定我的网站是否可以运行 PHP 5.5。

感谢您的任何建议!

【问题讨论】:

标签: php soap


【解决方案1】:

我点击了@liquidflo 的链接,我这样做是为了解决问题。

  • 列出所有已安装的 PHP 模块,以确保我稍后可以取回所有内容

    rpm -qa | grep php

我混合了我认为是 5.3 和 5.4 的模块然后我复制了所有模块的名称并用

删除了它们
#sudo yum remove php php-mbstring php-mysql php-cli php-gd ...(list all the modules...

然后我安装了所有已删除的 php 模块。

#sudo yum install php php-mbstring php-mysql php-cli php-gd php-soap ...(list all the modules, added php-soap now)...

我现在回到 PHP 5.3.3 并且 php-soap 可以工作了。

【讨论】:

    【解决方案2】:

    尝试下载这个..

    php soap 5.4.16-36 i686

    并强制安装..

    rpm -Uvh php-soap-5.4.16-36.1.el7_2.1.i686.rpm --nodeps
    

    【讨论】:

      【解决方案3】:

      可能是从remi仓库获取的php版本和soap版本冲突,

      以下命令列出存储库中可用的包,

      yum list php55-*
      

      这里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
      ...
      

      找出相关的包并运行它。

      yum install php55-php-soap.x86_64
      

      最后你必须启用soap模块,

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

      将以下行添加到 php.ini 文件中,

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

      重启apache服务器,

      sudo service httpd restart
      

      【讨论】:

      • 不,坏主意。不要混用 php 5.4 和 5.5 扩展,不要混用 php55-php*(SCL,多个版本)和 php-*(单个版本)
      • 我给出了 php55 的例子,你可以用你的实际 php 版本(php54 或其他)替换
      【解决方案4】:
         Installed: php-common-5.4.20-1.el6.remi.x86_64 (@remi)
      

      你有来自“remi”存储库的 php 5.4,所以你需要启用这个存储库来安装额外的扩展(顺便说一句,这意味着更新到最新的 5.4.45)。

      yum --enablerepo=remi install php-soap
      

      您还可以永久启用 php 5.4 存储库(或任何其他版本)

      yum-config-manager --enable remi-php54
      yum install php-soap
      

      注意:PHP 5.4 is now EOL,未由 PHP 项目维护,我强烈建议您更新为 maintained version(5.6、7、7.1)。

      Wizard instructions

      【讨论】:

        猜你喜欢
        • 2013-06-11
        • 1970-01-01
        • 2017-03-11
        • 2016-01-18
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2017-05-27
        相关资源
        最近更新 更多