问题
明天在本地跑共事我的项目的时候发现报错了
Uncaught Error: Call to undefined function bcdiv()
起因是因为本地php环境没有开启 bamath 扩大,于是便间接用命令
[root@k8s-master /]# yum install php-bcmath
报错如下
Error: php72w-common conflicts with php-common-5.4.16-48.el7.x86_64
解决办法
装置 epel+Remi 这两个源,Remi repository 是蕴含最新版本 PHP 和 MySQL 包的 Linux 源,由 Remi 提供保护。
yum install epel-release.noarch//装置remi的centos7的源rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm//这个remi的源装置后还须要批改一下,使其失效,我这里用的是7.2版本vi /etc/yum.repos.d/remi-php72把enabled=0改为enabled=1而后执行[root@k8s-master /]# yum install php-bcmath