the requested PHP extension mbstring is missing from your system

Martin Savov picture Martin Savov · Jul 3, 2017 · Viewed 19.9k times · Source

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.

Answer

TBowman picture TBowman · Jul 3, 2017

-- 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.

-- PREVIOUS SOLUTION FOR LINUX --

You need to install mbstring for php.

Use:

 sudo apt-get install phpX.X-mbstring

Where X.X is your version number of PHP.