How fix ext-mbstring and ext-dom error messages (Ubuntu 16.04)

How fix ext-mbstring and ext-dom error messages (Ubuntu 16.04)

The ext-mbstring and ext-dom error message is common

If you thought you were alone to come across the issue of ext-mbstring and ext-dom while running composer update, take heart. I came across this issue when I was developing locally on a new machine I had installed upgraded to UBuntu 16.04. When I tried to run

composer update

I was give the error message. After looking around for a solution I found one and I am sharing as well. It turns out these extensions are not installed/activated by default in php 7.0. In my case I am using nginx server and haven’t tested with Apache or any other server package.

For ext-mbstring missing, you will have something similar to

Whilst for ext-dom it looks like

The fixes are much simpler than you would be thinking… wait for it… just install the missing extensions.

sudo apt-get install php-mbstring
sudo apt-get install php-xml

Optionally, you can also install zip extension if your installation complains about it.

apt install zip unzip php7.0-zip

Even though this error showed up in Ubuntu 16.04, it may be present in other distributions as well\

You can read more from our blog