-1

Just installed composer by following the instructions of this link: https://www.digitalocean.com/community/tutorials/how-to-install-and-use-composer-on-ubuntu-16-04

Went into project repo to run composer install but it comes up with

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

Problem 1
    - Installation request for phpunit/php-code-coverage 4.0.8 -> satisfiable by phpunit/php-code-coverage[4.0.8].
    - phpunit/php-code-coverage 4.0.8 requires ext-dom * -> the requested PHP extension dom is missing from your system.
  Problem 2
    - Installation request for phpunit/phpunit 5.7.20 -> satisfiable by phpunit/phpunit[5.7.20].
    - phpunit/phpunit 5.7.20 requires ext-dom * -> the requested PHP extension dom is missing from your system.

  To enable extensions, verify that they are enabled in your .ini files:
- /etc/php/7.2/cli/php.ini
- /etc/php/7.2/cli/conf.d/10-mysqlnd.ini
- /etc/php/7.2/cli/conf.d/10-opcache.ini
- /etc/php/7.2/cli/conf.d/10-pdo.ini
- /etc/php/7.2/cli/conf.d/20-calendar.ini
- /etc/php/7.2/cli/conf.d/20-ctype.ini
- /etc/php/7.2/cli/conf.d/20-exif.ini
- /etc/php/7.2/cli/conf.d/20-fileinfo.ini
- /etc/php/7.2/cli/conf.d/20-ftp.ini
- /etc/php/7.2/cli/conf.d/20-gettext.ini
- /etc/php/7.2/cli/conf.d/20-iconv.ini
- /etc/php/7.2/cli/conf.d/20-json.ini
- /etc/php/7.2/cli/conf.d/20-mbstring.ini
- /etc/php/7.2/cli/conf.d/20-mysqli.ini
- /etc/php/7.2/cli/conf.d/20-pdo_mysql.ini
- /etc/php/7.2/cli/conf.d/20-phar.ini
- /etc/php/7.2/cli/conf.d/20-posix.ini
- /etc/php/7.2/cli/conf.d/20-readline.ini
- /etc/php/7.2/cli/conf.d/20-shmop.ini
- /etc/php/7.2/cli/conf.d/20-sockets.ini
- /etc/php/7.2/cli/conf.d/20-sysvmsg.ini
- /etc/php/7.2/cli/conf.d/20-sysvsem.ini
- /etc/php/7.2/cli/conf.d/20-sysvshm.ini
- /etc/php/7.2/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.

I am new to Ubuntu and haven't come across this before in Windows. Is this a common step in installing composer through Ubuntu? How do I solve this?

ahmeah
  • 11
  • 4
  • That is common with every run of composer: it checks the extensions. And reading the error message gives you an obvious hint about what to do – Nico Haase May 19 '18 at 06:33
  • Possible duplicate of [laravel composer update : the requested PHP extension dom is missing from your system](https://stackoverflow.com/questions/37873482/laravel-composer-update-the-requested-php-extension-dom-is-missing-from-your-s) – rob006 May 19 '18 at 14:18

1 Answers1

0

If you are using digitalocean as your host then my advise will be to contact them. I think they have a live support as well.

This is because the plan you are using might be having some restrictions or needs permissions.

If you are installing in your PC then refer to some blogs/sites which are meant for tutorials, not focusing on any particular setup.

NewBee
  • 394
  • 3
  • 15