getting error while updating Composer

for php7 you can do that:

sudo apt-get install php-gd php-xml php7.0-mbstring

In php7.2 Ubuntu 18.04 LTS and ubuntu 19.04

sudo apt-get install php-gd php-xml php7.2-mbstring

Works like a Charm


Your error message is pretty explicit about what is going wrong:

laravel/framework v5.2.9 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.

Do you have mbstring installed on your server and is it enabled?

You can install mbstring as part of the libapache2-mod-php5 package:

sudo apt-get install libapache2-mod-php5

Or standalone with:

sudo apt-get install php-mbstring

Installing it will also enable it, however you can also enable it by editing your php.ini file and remove the ; that is commenting it out if it is already installed.

If this is on your local machine, then follow the appropriate steps to install this on your environment.