laravel composer update : the requested PHP extension dom is missing from your system

PhpLaravelComposer Php

Php Problem Overview


I am using ubuntu 16.04, laravel 5.2 when i run update composer in my project directory its showing "the requested PHP extension dom is missing from your system" i checked installed packages of PHP, its available there

Php Solutions


Solution 1 - Php

Installing xml-extension (php7.0-xml in my case) solved the problem

sudo apt-get install php-xml

Solution 2 - Php

If PHP version is 7.2, execute the following command

sudo apt-get install php7.2-xml

Solution 3 - Php

Managed to fix it with a php version 5.6 :*

$ sudo apt-get update
$ sudo apt-get install php5.6-xml

Solution 4 - Php

You might have some missing dependencies, so first run

sudo apt-get -f install

Then install php-xml

sudo apt-get install php-xml

This worked for me.

Solution 5 - Php

DOM is a PHP extension and not a PHP package. This means that your version of PHP needs to be recompiled with the extension. It is possible however that your PHP was already compiled with DOM but that DOM is not enabled. You can check this in your php.ini (search for extension=dom.so and make sure it's uncommented).

Solution 6 - Php

In my case I use

> sudo apt-get update

and

> sudo apt-get install php7.3-xml

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionVivek ChaudhariView Question on Stackoverflow
Solution 1 - PhpAbazaView Answer on Stackoverflow
Solution 2 - PhpJoyalView Answer on Stackoverflow
Solution 3 - PhpManoj ThapliyalView Answer on Stackoverflow
Solution 4 - Phpuser6437700View Answer on Stackoverflow
Solution 5 - PhpAdrienView Answer on Stackoverflow
Solution 6 - PhpMiguel RomeroView Answer on Stackoverflow