0

I have installed laravel and I'm trying to create a new project I am using linux mint 20. php version 8.0, laravel 8.x. But I always get the same error

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

  Problem 1
    - 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].

To enable extensions, verify that they are enabled in your .ini files:
    - /etc/php/8.0/cli/php.ini
    - /etc/php/8.0/cli/conf.d/10-opcache.ini
    - /etc/php/8.0/cli/conf.d/10-pdo.ini
    - /etc/php/8.0/cli/conf.d/20-calendar.ini
    - /etc/php/8.0/cli/conf.d/20-ctype.ini
    - /etc/php/8.0/cli/conf.d/20-exif.ini
    - /etc/php/8.0/cli/conf.d/20-ffi.ini
    - /etc/php/8.0/cli/conf.d/20-fileinfo.ini
    - /etc/php/8.0/cli/conf.d/20-ftp.ini
    - /etc/php/8.0/cli/conf.d/20-gettext.ini
    - /etc/php/8.0/cli/conf.d/20-iconv.ini
    - /etc/php/8.0/cli/conf.d/20-mbstring.ini
    - /etc/php/8.0/cli/conf.d/20-phar.ini
    - /etc/php/8.0/cli/conf.d/20-posix.ini
    - /etc/php/8.0/cli/conf.d/20-readline.ini
    - /etc/php/8.0/cli/conf.d/20-shmop.ini
    - /etc/php/8.0/cli/conf.d/20-sockets.ini
    - /etc/php/8.0/cli/conf.d/20-sysvmsg.ini
    - /etc/php/8.0/cli/conf.d/20-sysvsem.ini
    - /etc/php/8.0/cli/conf.d/20-sysvshm.ini
    - /etc/php/8.0/cli/conf.d/20-tokenizer.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.

The things I've already tried

Remove the semicolon in php.in

;extension=php_intl.dll 
; remove semicolon
extension=php_intl.dll

Install

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

But nothing works, I still getting the same error.

Alezco05
  • 453
  • 1
  • 7
  • 22
  • Try `sudo apt install php-xml`. The ext-dom extension error should go away. If it doesn't try removing the vendor directory and composer.lock and then run `composer install` again – Donkarnash Dec 18 '20 at 21:56
  • Run `php -m` to see a list of all extensions installed for php on your system – Donkarnash Dec 18 '20 at 22:00
  • 1
    Don't make changes to php.ini. Your package manager will install a separate ini file for each module. Ensure you are installing the PHP 8.0 version of the modules. Possibly `sudo apt install php8.0-xml`? – miken32 Dec 18 '20 at 22:00
  • When on linux don't touch the .dll files they are windows specific. So uncommenting the .dll files will have no effect on linux – Donkarnash Dec 18 '20 at 22:01

0 Answers0