我最近尝试通过Composer安装包,但我有一个错误the requested PHP extension mbstring is missing from your system.
我从php.ini
中删除了分号,但它仍然不起作用。我该怎么办?
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
- 查找
php.ini
- 确保指令
extension_dir=C:pathtoserverphpext
设置并调整路径(设置您的PHP扩展目录) - 确保指令
extension=php_mbstring.dll
已设置(未注释)
如果这不起作用并且php_mbstring.dll文件丢失,那么这个堆栈的PHP安装就被破坏了。
For php 7.1
sudo apt-get install php7.1-mbstring
干杯!
我在php.ini
中设置了PHPRC变量和未注释的zend_extension=php_opcache.dll
,一切都运行良好。