How to resolve phpunit/phpunit 5.7.8 requires ext-dom * error while installing Laravel 5.4

Installing php-xml extension on ubuntu based on php version

If you are facing “phpunit/phpunit 5.7.8 requires ext-dom *” error at time of installing Laravel then you need to install or upgrade your php xml extension. You can installing php-xml by running below commands on terminal. Make sure you are installing right version of php-xml extension.

For PHP 7.0

sudo apt-get install php7.0-xml
You need to replace php7.0-xml to you relevant php version.Suppose if your php version is 5.6, then use command like this
sudo apt-get install php5.6-xml

Leave a Reply

Your email address will not be published. Required fields are marked *