LAMP PHP configuration
Asked Answered
B

4

27

OS: Ubuntu 17.10 (Artful Aardvark)

I have installed the LAMP stack and Laravel, and when I tried composer install in my Laravel application, I got the following errors.

- Installation request for phar-io/manifest 1.0.1 -> satisfiable by phar-io/manifest[1.0.1].
  - phar-io/manifest 1.0.1 requires ext-dom * -> the requested PHP extension dom is missing from your system.
Problem 2
  - Installation request for phpunit/php-code-coverage 5.2.2 -> satisfiable by phpunit/php-code-coverage[5.2.2].
  - phpunit/php-code-coverage 5.2.2 requires ext-dom * -> the requested PHP extension dom is missing from your system.
Problem 3
  - Installation request for phpunit/phpunit 6.4.3 -> satisfiable by phpunit/phpunit[6.4.3].
  - phpunit/phpunit 6.4.3 requires ext-dom * -> the requested PHP extension dom is missing from your system.
Problem 4
  - Installation request for theseer/tokenizer 1.1.0 -> satisfiable by theseer/tokenizer[1.1.0].
  - theseer/tokenizer 1.1.0 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.1/cli/php.ini
  - /etc/php/7.1/cli/conf.d/10-opcache.ini
  - /etc/php/7.1/cli/conf.d/10-pdo.ini
  - /etc/php/7.1/cli/conf.d/20-calendar.ini
  - /etc/php/7.1/cli/conf.d/20-ctype.ini
  - /etc/php/7.1/cli/conf.d/20-exif.ini
  - /etc/php/7.1/cli/conf.d/20-fileinfo.ini
  - /etc/php/7.1/cli/conf.d/20-ftp.ini
  - /etc/php/7.1/cli/conf.d/20-gettext.ini
  - /etc/php/7.1/cli/conf.d/20-iconv.ini
  - /etc/php/7.1/cli/conf.d/20-json.ini
  - /etc/php/7.1/cli/conf.d/20-mbstring.ini
  - /etc/php/7.1/cli/conf.d/20-pdo.ini
  - /etc/php/7.1/cli/conf.d/20-phar.ini
  - /etc/php/7.1/cli/conf.d/20-posix.ini
  - /etc/php/7.1/cli/conf.d/20-readline.ini
  - /etc/php/7.1/cli/conf.d/20-shmop.ini
  - /etc/php/7.1/cli/conf.d/20-sockets.ini
  - /etc/php/7.1/cli/conf.d/20-sysvmsg.ini
  - /etc/php/7.1/cli/conf.d/20-sysvsem.ini
  - /etc/php/7.1/cli/conf.d/20-sysvshm.ini
  - /etc/php/7.1/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 have rechecked the files, all extensions are enabled and they are located in the /usr/lib/php/20160303 folder.

Bohun answered 26/11, 2017 at 6:21 Comment(0)
S
82

Sometimes the problem is the php-xml extension.

Try:

sudo apt-get install php-xml
Sketchbook answered 26/11, 2017 at 8:0 Comment(1)
This is super odd that error has nothing about xml, yet this does the trick! Thank you.Passage
A
11

If still facing the issue then try

sudo apt-get install -y php7.1 php7.1-xml php7.1-mysql php7.1-curl php7.1-mbstring
Abdomen answered 5/5, 2018 at 20:16 Comment(2)
Worked for me! Thank you. I`ve tried the installation of php-xml and had the same problem.Flattery
Great! Thanks a lot.Dualpurpose
H
4

Try following command:

sudo apt-get install php-mbstring
sudo apt-get install php-xml
Hilarius answered 21/3, 2018 at 5:3 Comment(0)
G
1

As the log speaks we need to install the extension "dom". This is how we do it:

sudo apt install php7.1-dom

If the log shows only one extension missing, then the above command works. If there are other extensions missing, you can add those extensions in the same line like shown below:

sudo apt install php7.1-dom php7.1-ext-mbstring

That’s it. Now you won’t have any issues in installing PHP Composer. Enter composer install.

Guidebook answered 16/6, 2019 at 13:48 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.