how can i slove "Your requirements could not be resolved to an installable set of packages." in laravel8

I use Laravel recently and when i run composer create-project I'using ubuntu

This is what happens screen of error

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - phpunit/phpunit[9.5.10, ..., 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.5.10 -> satisfiable by phpunit/phpunit[9.5.10, 9.5.x-dev].

How do I fix that ?

Upvotes: 1

Views: 1614

Answers (2)

Jacob Mulquin
Jacob Mulquin

Reputation: 3608

You need to install the DOM extension for PHP. As you said you are using Ubuntu you can use the following command:

sudo apt-get install php7.4-dom

Upvotes: 3

Josh Alecyan
Josh Alecyan

Reputation: 1176

Try to ignore platform requirements

composer install --ignore-platform-reqs

Upvotes: 1

Related Questions