我最近尝试通过 Composer 安装软件包,但是我得到了一个错误 the requested PHP extension mbstring is missing from your system. 我从 php.ini中删除了分号,但它仍然不工作。我该怎么办?
the requested PHP extension mbstring is missing from your system.
php.ini
extension_dir=C:\path\to\server\php\ext
extension=php_mbstring.dll
If this doesn't work and the php_mbstring.dll file is missing, then the PHP installation of this stack is simply broken.
I set the PHPRC variable and uncommented zend_extension=php_opcache.dll in php.ini and all works well.
zend_extension=php_opcache.dll
sudo apt-get install php-mbstring # if your are using php 7.1 sudo apt-get install php7.1-mbstring # if your are using php 7.2 sudo apt-get install php7.2-mbstring # if your are using php 7.4 sudo apt-get install php7.4-mbstring
For php 7.1
sudo apt-get install php7.1-mbstring
Cheers!