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
Note this issue:
Error: php54-common conflicts with php-common-5.3.3-40.el6_6.x86_64
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
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
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
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.
Based on the comments above of @EtanReisner I have now been able to successfully install the SOAP package.
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
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
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
The results of which contain a more appropriate IUS based PHP SOAP package:
php54-soap.x86_64 5.4.36-1.ius.el6 ius
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
Which installed first time with no issues what so ever.
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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.