How to Resolve Problem “phpunit/phpunit[9.3.3, …, 9.5.x-dev] require ext-dom” When Installing Laravel

When you are trying to install Laravel and suddenly during the process you encounter a problem:

– phpunit/phpunit[9.3.3, …, 9.5.x-dev] require ext-dom * -> it is missing from your system. Install or enable PHP’s dom extension.
– Root composer.json requires phpunit/phpunit ^9.3.3 -> satisfiable by phpunit/phpunit[9.3.3, …, 9.5.x-dev].

You can do the steps below to resolve the problem so that you can continue installing Laravel.

sudo apt install php-mbstring
composer require laravel/passport
sudo apt-get update

sudo apt install php-xml
sudo apt-get install php-mbstring
composer update
composer require cviebrock/eloquent-sluggable

Then proceed again to the installation of Laravel. After finishing the process of installation you can now verify if you already installed it using http://127.0.0.1:8000.

2 thoughts on “How to Resolve Problem “phpunit/phpunit[9.3.3, …, 9.5.x-dev] require ext-dom” When Installing Laravel”

Leave a Comment

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