我正在尝试在 redhat 7 64 位上安装 Zabbix。通过命令zabbix server安装成功yum install zabbix-server-mysql
但是当我尝试安装 zabbix web 控制台时,我遇到了 php70u 与 php56u 的冲突。我执行以下命令:yum install zabbix-web-mysql
以下是该命令的输出:
Resolving Dependencies
--> Running transaction check
---> Package zabbix-web-mysql.noarch 0:3.0.2-1.el7 will be installed
--> Processing Dependency: zabbix-web = 3.0.2-1.el7 for package: zabbix-web-mysql-3.0.2-1.el7.noarch
--> Processing Dependency: php-mysql for package: zabbix-web-mysql-3.0.2-1.el7.noarch
--> Running transaction check
---> Package php56u-mysqlnd.x86_64 0:5.6.21-1.ius.el7 will be installed
--> Processing Dependency: php56u-pdo(x86-64) = 5.6.21-1.ius.el7 for package: php56u-mysqlnd-5.6.21-1.ius.el7.x86_64
---> Package zabbix-web.noarch 0:3.0.2-1.el7 will be installed
--> Processing Dependency: php >= 5.4 for package: zabbix-web-3.0.2-1.el7.noarch
--> Processing Dependency: php-gd for package: zabbix-web-3.0.2-1.el7.noarch
--> Processing Dependency: php-mbstring for package: zabbix-web-3.0.2-1.el7.noarch
--> Processing Dependency: dejavu-sans-fonts for package: zabbix-web-3.0.2-1.el7.noarch
--> Processing Dependency: php-bcmath for package: zabbix-web-3.0.2-1.el7.noarch
--> Processing Dependency: php-ldap for package: zabbix-web-3.0.2-1.el7.noarch
--> Processing Dependency: php-xml for package: zabbix-web-3.0.2-1.el7.noarch
--> Running transaction check
---> Package dejavu-sans-fonts.noarch 0:2.33-6.el7 will be installed
--> Processing Dependency: dejavu-fonts-common = 2.33-6.el7 for package: dejavu-sans-fonts-2.33-6.el7.noarch
---> Package mod_php70u.x86_64 0:7.0.6-1.ius.el7 will be installed
--> Processing Dependency: php-common(x86-64) = 7.0.6-1.ius.el7 for package: mod_php70u-7.0.6-1.ius.el7.x86_64
---> Package php56u-pdo.x86_64 0:5.6.21-1.ius.el7 will be installed
--> Processing Dependency: php56u-common(x86-64) = 5.6.21-1.ius.el7 for package: php56u-pdo-5.6.21-1.ius.el7.x86_64
---> Package php70u-bcmath.x86_64 0:7.0.6-1.ius.el7 will be installed
---> Package php70u-gd.x86_64 0:7.0.6-1.ius.el7 will be installed
--> Processing Dependency: libwebp.so.4()(64bit) for package: php70u-gd-7.0.6-1.ius.el7.x86_64
--> Processing Dependency: libXpm.so.4()(64bit) for package: php70u-gd-7.0.6-1.ius.el7.x86_64
---> Package php70u-ldap.x86_64 0:7.0.6-1.ius.el7 will be installed
---> Package php70u-mbstring.x86_64 0:7.0.6-1.ius.el7 will be installed
---> Package php70u-xml.x86_64 0:7.0.6-1.ius.el7 will be installed
--> Running transaction check
---> Package dejavu-fonts-common.noarch 0:2.33-6.el7 will be installed
---> Package libXpm.x86_64 0:3.5.11-3.el7 will be installed
---> Package libwebp.x86_64 0:0.3.0-3.el7 will be installed
---> Package php56u-common.x86_64 0:5.6.21-1.ius.el7 will be installed
--> Processing Dependency: php56u-pecl-jsonc(x86-64) for package: php56u-common-5.6.21-1.ius.el7.x86_64
---> Package php70u-common.x86_64 0:7.0.6-1.ius.el7 will be installed
--> Running transaction check
---> Package php56u-pecl-jsonc.x86_64 0:1.3.9-2.ius.el7 will be installed
--> Processing Dependency: php56u-pear for package: php56u-pecl-jsonc-1.3.9-2.ius.el7.x86_64
--> Processing Dependency: php56u-pear for package: php56u-pecl-jsonc-1.3.9-2.ius.el7.x86_64
--> Running transaction check
---> Package php56u-pear.noarch 1:1.10.1-4.ius.el7 will be installed
--> Processing Dependency: php56u-xml for package: 1:php56u-pear-1.10.1-4.ius.el7.noarch
--> Processing Dependency: php56u-posix for package: 1:php56u-pear-1.10.1-4.ius.el7.noarch
--> Processing Dependency: php56u-cli for package: 1:php56u-pear-1.10.1-4.ius.el7.noarch
--> Running transaction check
---> Package php56u-cli.x86_64 0:5.6.21-1.ius.el7 will be installed
---> Package php56u-process.x86_64 0:5.6.21-1.ius.el7 will be installed
---> Package php56u-xml.x86_64 0:5.6.21-1.ius.el7 will be installed
--> Processing Conflict: php70u-xml-7.0.6-1.ius.el7.x86_64 conflicts php-xml < 7.0
--> Processing Conflict: php70u-common-7.0.6-1.ius.el7.x86_64 conflicts php56u-common
--> Processing Conflict: php70u-common-7.0.6-1.ius.el7.x86_64 conflicts php-common < 7.0
--> Finished Dependency Resolution
Error: php70u-xml conflicts with php56u-xml-5.6.21-1.ius.el7.x86_64
Error: php70u-common conflicts with php56u-common-5.6.21-1.ius.el7.x86_64
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
这是我的重新处理:
base-local CELGAE Infra Management REPO - RedHat EL7 DVD 4,620
*epel/x86_64 Extra Packages for Enterprise Linux 7 - x86_64 10,050
ius/x86_64 IUS Community Packages for Enterprise Linux 7 - x86_64 302
ius-debuginfo/x86_64 IUS Community Packages for Enterprise Linux 7 - x86_64 - Debug 55
ius-source IUS Community Packages for Enterprise Linux 7 - x86_64 - Source 0
optional-local CELGAE Infra Management REPO - RedHat EL7 OPTIONAL 8,602
updates-local CELGAE Infra Management REPO - RedHat EL7 UPDATES 10,706
zabbix/x86_64 Zabbix Official Repository - x86_64 40
zabbix-non-supported/x86_64 Zabbix Official Repository non-supported - x86_64 4
我遵循了文档:https://www.zabbix.com/documentation/3.0/manual/installation/install_from_packages
我禁用了 repo ius 但它没有帮助。
答案1
最后,经过几个小时的搜索并且没有人反馈后,我终于解决了我的问题。我在这里分享,这样可能会对将来面临同样问题的其他人有所帮助。
首先,您需要安装 yum Replace :
yum install yum-plugin-replace
替换后,php-common
与您的冲突 php 版本。就我而言,是的php70u-common
。因此,我运行了以下命令:
yum replace php-common --replace-with php70u-common
或者如果它只用于 php,你也可以这样做:
yum replace php --replace-with php70u
之后,您可以安装您想要的软件包。就我而言,它是 Zabbix。