phpmyadmin - php 7.4 中缺少 mbstring 扩展

phpmyadmin - mbstring extension is missing in php 7.4

php 版本:7.4.8 OS: ubuntu

when I try to localhost/phpmyadmin am getting this error

缺少 mbstring 扩展名。请检查您的 PHP 配置。

并且我已经安装了 mbstring

sudo apt-get install php-mbstring
Reading package lists... Done
Building dependency tree       
Reading state information... Done
php-mbstring is already the newest version (2:7.4+76+ubuntu18.04.1+deb.sury.org+9).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

sudo apt-get install php7.4-mbstring
Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    php-mbstring is already the newest version (2:7.4+76+ubuntu18.04.1+deb.sury.org+9).
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

我也试试这个方法

  1. 我找到了php.ini
  2. 我搜索扩展名=php_mbstring.dll

但是 php.ini 文件中缺少扩展名=php_mbstring.dll

我该如何解决这个问题?

你试过给版本吗?

sudo apt-get install php7.4-mbstring

我建议你安装 composer 依赖项 symfony/polyfill 它涵盖了 mbstring 函数的使用。

如果您尚未安装,请前往 http://getcomposer.org 然后

composer require symfony/polyfill

Composer 是最佳实践,在世界各地的许多开源项目中得到广泛使用,所以不用担心。