【问题标题】:Can't install php-xml for PHP7 (CentOS)无法为 PHP7 (CentOS) 安装 php-xml
【发布时间】:2017-11-04 04:07:41
【问题描述】:

我已经安装了 PHP7,我想安装 php-xml,但它不会让我安装,因为我的系统上仍然有 PHP 5.4 的冲突痕迹,我无法摆脱。

这是我尝试运行“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


我什至尝试删除 php-common,但我得到了:

$ 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


所以它与 php-common-5.4.16-42.el7.x86_64 冲突,但 php-common-5.4.16-42.el7.x86_64 不存在。
任何帮助是极大的赞赏。
另外,我注意到它说

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

但我不希望它用于 php 5.4,我希望它用于 PHP7。

【问题讨论】:

  • 试试install php70w-xml
  • 您好,castis,这行得通。非常感谢。
  • 如何将其标记为已完成,以便显示绿色复选标记?
  • 我会添加这个作为答案。

标签: php xml dependencies


【解决方案1】:

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

yum install php-xml

【讨论】:

    【解决方案2】:

    既然你已经安装了webtatic repo,那么那些php安装应该是php70w-&lt;package&gt;

    yum install php70w-xml 应该可以解决问题。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-07-23
      • 1970-01-01
      • 1970-01-01
      • 2021-01-03
      • 2018-05-27
      • 2014-11-10
      • 2015-12-31
      • 2014-09-27
      相关资源
      最近更新 更多