简体   繁体   中英

Can't install php-xml for PHP7 (CentOS)

I have installed PHP7, and I want to install php-xml, but it won't let me because I still have conflicting traces of PHP 5.4 on my system, that I cannot get rid of.

Here is what it looks like when I try to run "yum install php-xml":

$ sudo yum install php-xml Loaded plugins: fastestmirror, langpacks, replace Loading mirror speeds from cached hostfile * base: mirror.fileplanet.com * epel: mirror.sjc02.svwh.net * extras: mirror.fileplanet.com * ius: mirrors.kernel.org * remi-safe: mirrors.mediatemple.net * rpmfusion-free-updates: mirror.math.princeton.edu * rpmfusion-nonfree-updates: mirror.math.princeton.edu * updates: mirror.fileplanet.com * webtatic: us-east.repo.webtatic.com Resolving Dependencies --> Running transaction check ---> Package php-xml.x86_64 0:5.4.16-42.el7 will be installed --> Processing Dependency: php-common(x86-64) = 5.4.16-42.el7 for package: php-xml-5.4.16-42.el7.x86_64 --> Running transaction check ---> Package php-common.x86_64 0:5.4.16-42.el7 will be installed --> Processing Conflict: php70w-common-7.0.19-1.w7.x86_64 conflicts php-common Finished Dependency Resolution Error: php70w-common conflicts with php-common-5.4.16-42.el7.x86_64 You could try using --skip-broken to work around the problem You could try running: rpm -Va --nofiles --nodigest


I've even tried to remove the php-common and I just get:

$ sudo yum remove php-common-5.4.16-42.el7.x86_64 Loaded plugins: fastestmirror, langpacks, replace No Match for argument: php-common-5.4.16-42.el7.x86_64 No Packages marked for removal


So it conflicts with php-common-5.4.16-42.el7.x86_64, yet php-common-5.4.16-42.el7.x86_64 doens't exist.
Any help is greatly appreciated.
Also, I noticed it says

<code>
Package php-xml.x86_64 0:5.4.16-42.el7 will be installed
</code>

But I don't want it for php 5.4, I want it for PHP7.

Since you've installed the webtatic repo , those php installations should be php70w-<package> .

yum install php70w-xml should do the trick.

在 Centos7 上,这适用于我的情况:

yum install php-xml

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM