Home » Php » laravel – the requested PHP extension mbstring is missing from your system

laravel – the requested PHP extension mbstring is missing from your system

Posted by: admin July 12, 2020 Leave a comment

Questions:

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.

How to&Answers:

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

Answer:

Its worked for me:

sudo apt-get install php7.2-mbstring

Answer:

It works

sudo apt-get install php7.3-mbstring

sudo apt install php-xml

composer update