我在centOs上有php 5.4,我删除了它并安装了php 7.
现在我的服务器上的一个代码返回以下错误:
PHP Fatal error: Call to undefined function mb_internal_encoding()
当我运行yum install php-mbstring时,我收到以下错误:
Error: php70u-common conflicts with php-common-5.4.16-43.el7_4.x86_64
Error: php70u-json conflicts with php-common-5.4.16-43.el7_4.x86_64
我已经删除并安装了几次php7,但我没有工作.
似乎centOs想要安装旧版本的软件包,但我不知道如何告诉它下载最新版本的mbstring
解决方法:
要为您的PHP版本搜索正确的MB-String,请尝试以下命令:
sudo yum list | egrep 'php' | grep 70
通过您在服务器中安装的特定PHP版本更改(70),此命令将显示与您的PHP版本相关的所有软件包.
此命令将显示:
ea-php70-php-mbstring.i686
ea-php70-php-mbstring.x86_64
现在您可以安装与您的系统兼容的版本.我希望它适合您.
标签:php,linux,centos
来源: https://codeday.me/bug/20190527/1162718.html