Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/279.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用yum和pear安装php-soap都失败_Php_Soap_Pear_Centos6_Yum - Fatal编程技术网

使用yum和pear安装php-soap都失败

使用yum和pear安装php-soap都失败,php,soap,pear,centos6,yum,Php,Soap,Pear,Centos6,Yum,我正在尝试在Centos 6.4服务器上安装PHP的SOAP扩展。我对包管理器相当陌生,从CLI安装包并在PHP中配置它们。我相当擅长管理php.ini和其他php配置文件(soap.ini等) 我已尝试使用以下命令安装: yum install php-soap 但这给了我以下错误: yum install php-soap Loaded plugins: downloadonly, fastestmirror Setting up Install Process Loading mirro

我正在尝试在Centos 6.4服务器上安装PHP的SOAP扩展。我对包管理器相当陌生,从CLI安装包并在PHP中配置它们。我相当擅长管理php.ini和其他php配置文件(soap.ini等)

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

yum install php-soap
但这给了我以下错误:

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
如果我列出我安装的所有与PHP相关的软件包,我会得到以下结果:

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扩展:

sudo pear install SOAP-0.13.0
这表明扩展已成功安装:

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 soap中添加了一个“extension=soap.so”行,但它仍然没有显示在我的phpinfo()中。从命令行运行“php-v”或“pear-info-SOAP-0.13.0”时,我还遇到以下错误:

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
似乎在“/usr/lib64/php/modules/”或服务器上的任何其他地方都没有soap.so文件,我使用以下方法进行了检查:

cd /
find -name soap.so
我卸载和重新安装了几次,每次都是一样的


有人能解释一下为什么这两种方法都失败了吗?如果需要,我很乐意提供更多详细信息。

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

问题是我混合了来自EPEL和IUS存储库的PHP包。从上面可以看出

yum list installed | grep php
这些PHP软件包中的大多数都来自于IUS存储库,似乎是我试图使用的PHP soap软件包

yum install php-soap
是一个基于EPEL的包,因此php公共文件中突出显示了冲突。根据以上建议,我已经运行了以下程序

yum list | grep ^php54
其结果包含一个更合适的基于IUS的PHP SOAP包:

php54-soap.x86_64                         5.4.36-1.ius.el6              ius   
已经卸载了我最初尝试留下的任何失败的SOAP包安装,然后我运行了

yum安装php54-soap

它是第一次安装,没有任何问题


对于这个问题的第二部分,关于基于PEAR的包管理器未能成功安装包的原因,我没有找到任何解决方案

您已经安装了混合的CentOS/EPEL/IUS php软件包。那可能不是个好主意。您可以尝试用
php54 common
替换
php common
,看看这是否有帮助(可能还有其他软件包也需要类似的处理)。您好@EtanReisner谢谢您的回复,我在linux服务器管理和软件包管理方面不是很快,我刚刚继承了这台服务器,我最初没有设置它。你能告诉我EPEL和IUS包之间的区别是什么吗?这与存储库/维护人员有关吗?无论哪种方式,除非我弄错了,否则我已经安装了php54通用软件包,因此最初的yum错误和我的'yum list installed | grep php'结果的第7行:php54-common.x86_64 5.4.36-1.ius.el6[at]ius
EPEL
ius
是不同的软件包存储库(不同的维护人员、不同的版本、不同的QA/等实践).
EPEL
是一个Fedora项目。我对
IUS
一无所知。啊,事实上,安装了php54 common,我误读了错误。这可能意味着您正试图安装CentOS或
EPEL
php soap包,它需要
php common
而不是
php54 common
。这是一个
php54-soap
程序包可从
IUS
获得?Hi@EtanReisner在完成“yum list | grep^php54”后,我可以看到有一个php54 soap程序包,它已按预期安装。在我的PHP.ini文件中包含了“extension=soap.so”行并重新启动web服务器后,我现在可以在phpinfo()中看到soap程序包的详细信息输出。非常感谢您的帮助,我将根据您的评论回答我自己的问题。
php54-soap.x86_64                         5.4.36-1.ius.el6              ius