我尝试使用yum在php54-xml
中安装Centos 6.4
。
我在控制台中做了yum install php54-xml
我得到以下错误:
Error: Package: 1:php-pear-1.9.4-4.el6.noarch (@base)
Requires: php-cli >= 5.1.0-1
Removing: php54-cli-5.4.22-1.ius.el6.x86_64 (@php-ius)
php-cli = 5.4.22-1.ius.el6
Obsoleted By: php55-cli-5.5.10-1.el6.x86_64 (CentALT)
Not found
Available: php-cli-5.3.3-26.el6.x86_64 (base)
php-cli = 5.3.3-26.el6
Available: php-cli-5.3.3-27.el6_5.x86_64 (updates)
php-cli = 5.3.3-27.el6_5
Available: php-cli-5.3.27-3.el6.x86_64 (CentALT)
php-cli = 5.3.27-3.el6
Available: php53u-cli-5.3.27-1.ius.el6.i686 (php-ius)
php-cli = 5.3.27-1.ius.el6
Available: php54-cli-5.4.21-1.ius.el6.i686 (php-ius)
php-cli = 5.4.21-1.ius.el6
Available: php54-cli-5.4.21-2.ius.el6.i686 (php-ius)
php-cli = 5.4.21-2.ius.el6
Available: php54w-cli-5.4.24-1.w6.x86_64 (webtatic)
php-cli = 5.4.24-1.w6
Available: php54w-cli-5.4.25-1.w6.x86_64 (webtatic)
php-cli = 5.4.25-1.w6
Available: php55w-cli-5.5.8-1.w6.x86_64 (webtatic)
php-cli = 5.5.8-1.w6
Available: php55w-cli-5.5.9-1.w6.x86_64 (webtatic)
php-cli = 5.5.9-1.w6
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
我尝试安装php-cli
来解决问题然后我收到以下错误:
Transaction Check Error:
file /etc/php.ini from install of php-common-5.3.27-3.el6.x86_64 conflicts with file from package php54-common-5.4.22-1.ius.el6.x86_64
file /usr/lib64/php-zts/modules/curl.so from install of php-common-5.3.27-3.el6.x86_64 conflicts with file from package php54-common-5.4.22-1.ius.el6.x86_64
file /usr/lib64/php/modules/curl.so from install of php-common-5.3.27-3.el6.x86_64 conflicts with file from package php54-common-5.4.22-1.ius.el6.x86_64
file /usr/lib64/php-zts/modules/fileinfo.so from install of php-common-5.3.27-3.el6.x86_64 conflicts with file from package php54-common-5.4.22-1.ius.el6.x86_64
file /usr/lib64/php/modules/fileinfo.so from install of php-common-5.3.27-3.el6.x86_64 conflicts with file from package php54-common-5.4.22-1.ius.el6.x86_64
file /usr/lib64/php-zts/modules/json.so from install of php-common-5.3.27-3.el6.x86_64 conflicts with file from package php54-common-5.4.22-1.ius.el6.x86_64
file /usr/lib64/php/modules/json.so from install of php-common-5.3.27-3.el6.x86_64 conflicts with file from package php54-common-5.4.22-1.ius.el6.x86_64
file /usr/lib64/php-zts/modules/phar.so from install of php-common-5.3.27-3.el6.x86_64 conflicts with file from package php54-common-5.4.22-1.ius.el6.x86_64
file /usr/lib64/php/modules/phar.so from install of php-common-5.3.27-3.el6.x86_64 conflicts with file from package php54-common-5.4.22-1.ius.el6.x86_64
file /usr/lib64/php-zts/modules/zip.so from install of php-common-5.3.27-3.el6.x86_64 conflicts with file from package php54-common-5.4.22-1.ius.el6.x86_64
file /usr/lib64/php/modules/zip.so from install of php-common-5.3.27-3.el6.x86_64 conflicts with file from package php54-common-5.4.22-1.ius.el6.x86_64
file /usr/bin/phar.phar from install of php-cli-5.3.27-3.el6.x86_64 conflicts with file from package php54-cli-5.4.22-1.ius.el6.x86_64
file /usr/bin/php from install of php-cli-5.3.27-3.el6.x86_64 conflicts with file from package php54-cli-5.4.22-1.ius.el6.x86_64
file /usr/bin/php-cgi from install of php-cli-5.3.27-3.el6.x86_64 conflicts with file from package php54-cli-5.4.22-1.ius.el6.x86_64
file /usr/bin/phpize from install of php-cli-5.3.27-3.el6.x86_64 conflicts with file from package php54-cli-5.4.22-1.ius.el6.x86_64
file /usr/share/man/man1/php.1.gz from install of php-cli-5.3.27-3.el6.x86_64 conflicts with file from package php54-cli-5.4.22-1.ius.el6.x86_64
file /usr/share/man/man1/phpize.1.gz from install of php-cli-5.3.27-3.el6.x86_64 conflicts with file from package php54-cli-5.4.22-1.ius.el6.x86_64
似乎php5.3.x
之间存在冲突,这是我之前使用php5.4.x
有没有办法安装php54-xml
所以我可以使用dom_import_simplexml
函数,因为我在控制台中运行PHP脚本时出现undefined
错误?
答案 0 :(得分:0)
除了普通的CentOS回购之外,你还有很多来自repos(php-ius,webtatic)的软件包。来自这些仓库的包可能有不同的方式将其包集成到系统中。我建议坚持一个来源 - 例如Red Hat支持的软件集合库 - 从那里安装的软件包可以在另一个旁边安装,即您可以并行安装多个PHP版本:
https://www.softwarecollections.org/en/scls/?search=php
要在从软件集合安装软件包之前清理系统,我建议删除所有第三方软件包。您可以通过以下方式显示要删除的包:
yum list extras --disablerepo=\* --enablerepo=base --enablerepo=updates
yum remove <all_the_listed_packages>
第一个命令基本上列出了您从CentOS&lt; base 或更新 repo以外的存储库安装的所有软件包。