2017-09-18 44 views
0

我有OS的zabbix 3.4,甲骨文的Linux 7.4:錯誤的php-MBSTRING和php-bcmath時

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 

試圖尋找

[根@ zabbixapp01 ZABBIX]#蔭搜索MBSTRING

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

[根@ zabbixapp01 zabbix]#yum搜索bcmat h

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

如何解決問題?與回購

+0

似乎也被問到(更恰當)在服務器錯誤:https://serverfault.com/questions/874297/zabbix-3-4-oracle-linux-7-4-error-with-php-mbstring-and -php-bcmath。 – Richlv

+0

好的,問題解決了,請寫下答案 –

回答

0

編輯的文件,並添加新的回購

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