laravel 您的系统中缺少请求的 PHP 扩展 mbstring
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/44891013/
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
the requested PHP extension mbstring is missing from your system
提问by Martin Savov
my error message that I am getting from the composer is: Your requirements could not be resolved to an installable set of packages.
我从作曲家那里得到的错误消息是:无法将您的要求解析为一组可安装的软件包。
Problem 1
- Installation request for laravel/framework v5.4.28 -> satisfiable by laravel/framework[v5.4.28].
- laravel/framework v5.4.28 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
Problem 2
- Installation request for phpunit/phpunit 5.7.21 -> satisfiable by phpunit/phpunit[5.7.21].
- phpunit/phpunit 5.7.21 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
Problem 3
- laravel/framework v5.4.28 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- laravel/tinker v1.0.1 requires illuminate/console ~5.1 -> satisfiable by laravel/framework[v5.4.28].
- Installation request for laravel/tinker v1.0.1 -> satisfiable by laravel/tinker[v1.0.1].
I have tried uncommenting the extension=php_mbstring.dll but it still raises the error. I have tried to change the extension_dir in the "php.ini" and it gives an error. Help is appreciated.
我试过取消对 extension=php_mbstring.dll 的注释,但它仍然引发错误。我试图更改“php.ini”中的 extension_dir,但出现错误。帮助表示赞赏。
回答by TBowman
-- EDIT BASED ON NEW INFORMATION --
-- 根据新信息进行编辑 --
Since this is Windows, re-installing PHP, enabling the extension in the PHP.INI file, and restarting the Webserver, should work.
由于这是 Windows,重新安装 PHP、启用 PHP.INI 文件中的扩展并重新启动 Web 服务器应该可以工作。
-- PREVIOUS SOLUTION FOR LINUX --
-- 以前的 LINUX 解决方案 --
You need to install mbstring for php.
您需要为 php 安装 mbstring。
Use:
用:
sudo apt-get install phpX.X-mbstring
Where X.X is your version number of PHP.
其中 XX 是您的 PHP 版本号。
回答by Diego Santa Cruz Mendezú
Its worked for me:
它对我有用:
sudo apt-get install php7.2-mbstring
回答by mashud_roman
It works
有用
sudo apt-get install php7.3-mbstring
须藤 apt-get 安装 php7.3-mbstring
sudo apt install php-xml
sudo apt 安装 php-xml
composer update
作曲家更新