0

trying to install php-xml on centos7 (php 5.6)

getting following error

[root@server ~]# sudo yum install php-xml
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * atomic: www4.atomicorp.com
 * epel: epel.mirror.constant.com
 * remi-safe: remi.mirror.ate.info
 * webtatic: uk.repo.webtatic.com
Resolving Dependencies
--> Running transaction check
---> Package php-xml.x86_64 0:5.4.45-56.el7.art will be installed
--> Processing Dependency: php-common(x86-64) = 5.4.45-56.el7.art for package: php-xml-5.4.45-56.el7.art.x86_64
--> Finished Dependency Resolution
Error: Package: php-xml-5.4.45-56.el7.art.x86_64 (atomic)
           Requires: php-common(x86-64) = 5.4.45-56.el7.art
           Installed: php-common-5.6.33-1.el7.remi.x86_64 (@remi-php56)
               php-common(x86-64) = 5.6.33-1.el7.remi
           Available: php-common-5.4.16-42.el7.x86_64 (base)
               php-common(x86-64) = 5.4.16-42.el7
           Available: php-common-5.4.16-43.el7_4.x86_64 (updates)
               php-common(x86-64) = 5.4.16-43.el7_4
           Available: php-common-5.4.45-54.el7.art.x86_64 (atomic)
               php-common(x86-64) = 5.4.45-54.el7.art
           Available: php-common-5.4.45-56.el7.art.x86_64 (atomic)
               php-common(x86-64) = 5.4.45-56.el7.art
          ...
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

I've read around and people are suggesting i downgrade my php, however, i need 5.6 for scripts im trying to run.

Thanks in advance

Michael Berry
  • 5
  • 1
  • 1
  • 6
  • As the error says the `php-xml` lib has the `php-common` lib as dependency which is installed, but the problem is that the `php-common` version installed is newer than the version required by `php-xml`. One solution is trying to downgrade `php-common` – Claudio Jan 04 '18 at 17:43
  • You probably need to do a little research on https://unix.stackexchange.com/ Not really a good fit for SO. –  Jan 04 '18 at 18:46

2 Answers2

3
      Installed: php-common-5.6.33-1.el7.remi.x86_64 (@remi-php56)

As you have php 5.6 from remi-php56 repository you have to enable the same repository to install additional extensions.

As explained by the Wizard :

yum-config-manager --enable remi-php56
yum install php-xml

P.S. and you should disable atomic and webtatic, as you don't use PHP from there.

Remi Collet
  • 6,198
  • 1
  • 20
  • 25
0

Try downgrading the php-common lib by running the following command: (More info)

sudo yum downgrade php php-common php-cli
Claudio
  • 5,078
  • 1
  • 22
  • 33