Zabbix 3.4、Oracle Linux 7.4:php-mbstring 和 php-bcmath 出错

Zabbix 3.4, Oracle Linux 7.4: Error with php-mbstring and php-bcmath

我有OS

NAME="Oracle Linux Server"
VERSION="7.4"
ID="ol"
VERSION_ID="7.4"
PRETTY_NAME="Oracle Linux Server 7.4"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:oracle:linux:7:4:server"
HOME_URL="https://linux.oracle.com/"
BUG_REPORT_URL="https://bugzilla.oracle.com/"

ORACLE_BUGZILLA_PRODUCT="Oracle Linux 7"
ORACLE_BUGZILLA_PRODUCT_VERSION=7.4
ORACLE_SUPPORT_PRODUCT="Oracle Linux"
ORACLE_SUPPORT_PRODUCT_VERSION=7.4

尝试安装zabbix 3.4

 rpm -Uvh http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-1.el7.centos.noarch.rpm

yum install zabbix-server-mysql zabbix-web-mysql

并返回错误

Error: Package: zabbix-web-3.4.1-1.el7.noarch (zabbix)
           Requires: php-mbstring
Error: Package: zabbix-web-3.4.1-1.el7.noarch (zabbix)
           Requires: php-bcmath

已尝试安装

sudo yum install php-mbstring

返回

Loaded plugins: ulninfo
No package php-mbstring available.
Error: Nothing to do

已尝试搜索

[root@zabbixapp01 zabbix]# yum search mbstring

Loaded plugins: ulninfo
Warning: No matches found for: mbstring
No matches found

[root@zabbixapp01 zabbix]# yum search bcmath

Loaded plugins: ulninfo
Warning: No matches found for: bcmath
No matches found

如何解决问题?

使用 repo 编辑了文件并添加了新的 repo

nano /etc/yum.repos.d/public-yum-ol7.repo


[ol7_optional_latest]
name=Oracle Linux $releasever Optional Latest ($basearch)
baseurl=http://yum.oracle.com/repo/OracleLinux/OL7/optional/latest/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=1

启用新存储库后

yum clean all
yum-config-manager --enable ol7_optional_latest

检查状态新回购

yum repolist all

必须返回例如

!ol7_optional_latest/x86_64    Oracle Linux 7Server Optional Latest (x86_64)                                                        enabled: 12,831+3,515