install php-xml on centos 7 [closed]

廉价感情. 提交于 2020-01-06 06:19:26

问题


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


回答1:


      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.




回答2:


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

sudo yum downgrade php php-common php-cli


来源:https://stackoverflow.com/questions/48100652/install-php-xml-on-centos-7

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!