I am attempting to install the Soap module (from webtatic PHP 5.6) on PHP 5.3.3 on CentOS 6. When I run the yum command yum install php56w-soap
to install it I get the message below:
Error: php56w-common conflicts with php-common-5.3.3-49.el6.x86_64
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
What are my options to resolve this? Should I just run with --skip-broken
, are there other options?
I am running php 5.6.3 and CentOS 6 on a VPS
You're using a third-party repository, so understand you're asking for some pain.
The webtatic repo is better than some, but it's not perfect: for one thing, those packages don't properly include an obsoletes, depends, and conflicts list that we really need in this particular case.
The comparison logic - which normally helps us - is tripping over the knowledge that PHP is the only replacement for PHP; not 'php56w'. So it's not going to automatically toss out the php533 stack that's in place now, just to satisfy dependencies. You have to give it a proper hint.
Pull out php, before installing the alternative stack: find everything installed from the 5.3.3 package, reduce it to the name, and pass it into a yum invocation:
rpm -qa --qf "%{name}-%{version}\n" \
| grep 5.3.3 \
| sed 's/-5.3.3$//' \
| xargs yum erase
and then
yum install php56w-soap
Do the same but try just removing php-common
and hoping it'll drag everything else out. It should, and it's easier than the above option, but it's not 100% perfect sometimes.
yum erase php-common
and then
yum install php56w-soap
Especially if you have dependencies you won't/can't remove, which depend on php (and are smart enough to live with php56w) use the yum replace plugin
from IUS . It's a few steps back to go one step forward, but we agree you're arguably already in for a penny now.
So, install that
yum install \
https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm \
https://centos6.iuscommunity.org/ius-release.rpm
yum install yum-plugin-replace
and pull the switch:
yum replace php --replace-with php56w
It sometimes complains about missing dependencies, and that's where you'll either need to close your eyes and hit 'y' or decide whether you can live with missing pieces and pledge to work around THEM once it's all done. Dependency hell is always self-inflicted.
The command will present you with a huge and scary list of the solution it's plotted, so look over that list. It should make sense. Say 'y', like in any other yum invocation, when you're ready to install software.
Your last option, and this is an important one to consider, is to decide whether you're ready and willing to live with third party repos, and the dependency issues and flaky update routines they sometimes have. Even EPEL or SCL misses updates (ahem. php7.1.18 any time yet?), and I wouldn't expect the more Hobbyist ones to be any better. I'd actually expect much worse. So, if you can live with minimal testing, no support and not much help, then charge on ahead.
Otherwise, decide whether you can live with a boring, stock, supported, safe, (more) secure php 5.3.3 that comes with Centos 6. Everything certified on RHEL/Centos will work with it, you won't find yourself splitting more dependency hairs with every additional piece you install, and you'll be able to sleep better at night if you can live with the Long-term Distro-supported version of a product instead of some shiny gift squeezed out last week and barely tested.
But I've become biased in 25 years :-)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With