Composer - 您的系统中缺少请求的 PHP 扩展 mbstring
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/32488917/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Composer - the requested PHP extension mbstring is missing from your system
提问by Jozef Cipa
I've recently tried to install package through Composer, but I have got an error the requested PHP extension mbstring is missing from your system.
I removed semicolon from php.ini
, but it still doesn't work. What should I do?
我最近尝试通过 Composer 安装软件包,但是我the requested PHP extension mbstring is missing from your system.
从 中删除了分号时出现错误php.ini
,但它仍然不起作用。我该怎么办?
采纳答案by Jozef Cipa
I set the PHPRC variable and uncommented zend_extension=php_opcache.dll
in php.ini
and all works well.
我设置了PHPRC变量和注释掉zend_extension=php_opcache.dll
的php.ini
和一切运作良好。
回答by Pranay Aryal
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
回答by Jens A. Koch
- find your
php.ini
- make sure the directive
extension_dir=C:\path\to\server\php\ext
is set and adjust the path (set your PHP extension dir) - make sure the directive
extension=php_mbstring.dll
is set (uncommented)
- 找你的
php.ini
- 确保
extension_dir=C:\path\to\server\php\ext
设置了指令并调整路径(设置您的 PHP 扩展目录) - 确保
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.
如果这不起作用并且缺少 php_mbstring.dll 文件,那么这个堆栈的 PHP 安装就被破坏了。
回答by Michel
For php 7.1
对于 php 7.1
sudo apt-get install php7.1-mbstring
Cheers!
干杯!