美文网首页
centos laravel报错Call to undefin

centos laravel报错Call to undefin

作者: 道翼 | 来源:发表于2020-04-02 14:27 被阅读0次

是因为缺少php扩展库bcmath

1.刚开始用下面的命令直接安装:

yum install php-bcmath

报错:

No package php-mcrypt available

解决:

yum  install epel-release  //扩展包更新包

yum  update //更新yum源

2.这样之后再执行安装是可以安装,但会报版本冲突,php5.5跟我线上的7.1冲突

Error: php71w-common conflicts with php-common-5.4.16-46.1.el7_7.x86_64

再搜过后,发现可以指定版本,根据你线上的php版本,进行更改,我的线上版本是7.1 (7.2更换为php72w-bcmath)
执行命令

yum install php71w-bcmath

下载成功后重启php就可以了

service php-fpm restart

相关文章

网友评论

      本文标题:centos laravel报错Call to undefin

      本文链接:https://www.haomeiwen.com/subject/rtjxphtx.html