我已经安装了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。
答案 0 :(得分:4)
由于您已安装webtatic repo,因此这些php安装应为php70w-<package>
。
yum install php70w-xml
应该可以解决问题。
答案 1 :(得分:0)
在 Centos7 上这适用于我的情况:
SELECT DATEADD(month,-18,cast(GETDATE() as datetime))