用yum和pear安装php-soap均失败 [英] Installing php-soap with yum and pear both fail

查看:81
本文介绍了用yum和pear安装php-soap均失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在Centos 6.4服务器上安装PHP的SOAP扩展。我对软件包管理器不熟悉,无法从CLI安装软件包并在PHP中对其进行配置。我相当有能力管理php.ini和其他PHP配置文件(soap.ini等)。

I am trying to install the SOAP extension for PHP on a Centos 6.4 server. I am fairly unfamiliar with package managers, installing packages from the CLI and configuring them within PHP. I am fairly competent with managing the php.ini and other PHP config files (soap.ini etc).

我尝试使用以下命令进行安装:

I have tried installing this using the command:

yum install php-soap

但是这给了我以下错误:

but this gives me the following error:

yum install php-soap
Loaded plugins: downloadonly, fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
drivesrvr                                                                                                                                                                                                |  951 B     00:00     
Resolving Dependencies
There are unfinished transactions remaining. You might consider running yum-complete-transaction first to finish them.
The program yum-complete-transaction is found in the yum-utils package.
--> 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
--> Running transaction check
---> Package php-common.x86_64 0:5.3.3-40.el6_6 will be installed
--> Processing Conflict: php54-common-5.4.36-1.ius.el6.x86_64 conflicts php-common < 5.4
--> Finished Dependency Resolution
Error: php54-common conflicts with php-common-5.3.3-40.el6_6.x86_64
 You could try using --skip-broken to work around the problem
** Found 1 pre-existing rpmdb problem(s), 'yum check' output follows:
cloud-init-0.7.5-10.el6.centos.2.x86_64 has missing requires of PyYAML

请注意以下问题:

Error: php54-common conflicts with php-common-5.3.3-40.el6_6.x86_64

如果列出所有已安装的与PHP相关的软件包,我将得到以下信息:

If I list all the PHP related packages I have installed I get this:

yum list installed | grep php
php-php-gettext.noarch             1.0.11-3.el6                       @epel     
php-tcpdf.noarch                   6.1.1-1.el6                        @epel     
php-tcpdf-dejavu-sans-fonts.noarch 6.1.1-1.el6                        @epel     
php54.x86_64                       5.4.36-1.ius.el6                   @ius      
php54-bcmath.x86_64                5.4.36-1.ius.el6                   @ius      
php54-cli.x86_64                   5.4.36-1.ius.el6                   @ius      
php54-common.x86_64                5.4.36-1.ius.el6                   @ius      
php54-devel.x86_64                 5.4.36-1.ius.el6                   @ius      
php54-gd.x86_64                    5.4.36-1.ius.el6                   @ius      
php54-mbstring.x86_64              5.4.36-1.ius.el6                   @ius       
php54-mcrypt.x86_64                5.4.36-1.ius.el6                   @ius      
php54-mysql.x86_64                 5.4.36-1.ius.el6                   @ius      
php54-pdo.x86_64                   5.4.36-1.ius.el6                   @ius      
php54-pear.noarch                  1:1.9.5-2.ius.el6                  @ius      
php54-pecl-apc.x86_64              3.1.13-2.ius.el6                   @ius      
php54-pecl-memcache.x86_64         3.0.8-1.ius.el6                    @ius      
php54-suhosin.x86_64               0.9.37-1.ius.el6                   @ius      
php54-tidy.x86_64                  5.4.36-1.ius.el6                   @ius      
php54-xml.x86_64                   5.4.36-1.ius.el6                   @ius      
phpMyAdmin.noarch                  4.0.10.7-1.el6                     @epel     

我还尝试使用pear安装SOAP扩展:

I have also tried to install the SOAP extension using pear:

sudo pear install SOAP-0.13.0

此声明扩展已成功安装:

This claims that the extension was installed successfully:

WARNING: "pear/HTTP_Request" is deprecated in favor of "pear/HTTP_Request2"
Did not download optional dependencies: pear/Mail, pear/Mail_Mime, pear/Net_DIME, use --alldeps to download automatically
WARNING: "pear/Net_URL" is deprecated in favor of "pear/Net_URL2"
pear/SOAP can optionally use package "pear/Mail"
pear/SOAP can optionally use package "pear/Mail_Mime"
pear/SOAP can optionally use package "pear/Net_DIME"
downloading SOAP-0.13.0.tgz ...
Starting to download SOAP-0.13.0.tgz (85,945 bytes)
....................done: 85,945 bytes
downloading HTTP_Request-1.4.4.tgz ...
Starting to download HTTP_Request-1.4.4.tgz (17,109 bytes)
...done: 17,109 bytes
downloading Net_URL-1.0.15.tgz ...
Starting to download Net_URL-1.0.15.tgz (6,303 bytes)
...done: 6,303 bytes
downloading Net_Socket-1.0.14.tgz ...
Starting to download Net_Socket-1.0.14.tgz (5,600 bytes)
...done: 5,600 bytes
install ok: channel://pear.php.net/Net_URL-1.0.15
install ok: channel://pear.php.net/Net_Socket-1.0.14
install ok: channel://pear.php.net/HTTP_Request-1.4.4
install ok: channel://pear.php.net/SOAP-0.13.0

但是,尽管在我的php.ini中添加了 extension = soap.so行,但是SOAPinfo仍未显示在我的phpinfo()中。从命令行运行'php -v'或'pear info SOAP-0.13.0'时,我还会收到以下错误:

However, despite having added a 'extension=soap.so' line to my php.ini SOAP still does not show up in my phpinfo(). I also get the following error when running 'php -v' or 'pear info SOAP-0.13.0' from the command line:

PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/soap.so' - /usr/lib64/php/modules/soap.so: cannot open shared object file: No such file or directory in Unknown on line 0

似乎'/中没有soap.so文件usr / lib64 / php / modules /'或服务器上的其他任何地方,我都使用以下命令进行了检查:

It would seem that there is no soap.so file within '/usr/lib64/php/modules/' or anywhere else on the server, I have checked using:

cd /
find -name soap.so

我已卸载并重新安装了几次,其每次都相同。

I have uninstalled and re-installed a couple of times and its the same every time.

任何人都无法提供关于这些方法为何都失败的任何解释吗?

Can anyone offer any explanations as to why either of these methods is failing? Happy to provide additional details if required.

推荐答案

基于@EtanReisner的上述评论,我现在已经能够成功安装SOAP程序包。

Based on the comments above of @EtanReisner I have now been able to successfully install the SOAP package.

问题是我混合使用了EPEL和IUS存储库中的PHP程序包。从上面可以看到的蜜蜂

The issue was that I had a mix of PHP packages from both the EPEL and IUS repositories. As can bee seen from the above

yum list installed | grep php

大多数这些PHP软件包都来自IUS存储库,看来php-soap我尝试使用以下软件包安装的软件包

Most of these PHP packages are from the IUS repository, it would seem that the php-soap package I was trying to install using

yum install php-soap

是基于EPEL的软件包,因此在php-common文件中突出显示了冲突。根据上面的建议,我运行了以下

Was an EPEL based package, hence the conflict highlighted on the php-common file. As per the suggestions above I have run the following

yum list | grep ^php54

其结果包含一个更合适的基于IUS的PHP SOAP软件包:

The results of which contain a more appropriate IUS based PHP SOAP package:

php54-soap.x86_64                         5.4.36-1.ius.el6              ius   

已经卸载了我最初尝试遗留下来的SOAP软件包的任何失败安装,然后运行了

Having already uninstalled any of the failed installations of the SOAP package left behind by my initial attempts I then ran

yum install php54-soap

yum install php54-soap

第一次安装没有任何问题。

Which installed first time with no issues what so ever.

我没有找到有关为何基于PEAR的软件包管理器未能成功安装软件包的问题的第二部分的任何解决方案。

I have not found any solutions to the second part of this question regarding why the PEAR based package manager failed to install the package successfully.

这篇关于用yum和pear安装php-soap均失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆