前提
はじめましてAWS初学者です。
AWSのEC2でlaravelアプリをデプロイしています。$composer install
でパッケージをインストールしようとしたときにエラーが出てしまいました。
AWS EC2にLaravelをデプロイする手順を参考に進めました。
初歩的な質問ですが教えていただけるとありがたいです。
実現したいこと
$composer install
でパッケージをインストールする。
発生している問題・エラーメッセージ
[ec2-user@4937 ディレクトリ名]$ composer install Installing dependencies from lock file (including require-dev) Verifying lock file contents can be installed on current platform. Your lock file does not contain a compatible set of packages. Please run composer update. Problem 1 - tijsverkoyen/css-to-inline-styles is locked to version 2.2.4 and an update of this package was not requested. - tijsverkoyen/css-to-inline-styles 2.2.4 requires ext-dom * -> it is missing from your system. Install or enable PHP's dom extension. Problem 2 - phar-io/manifest is locked to version 2.0.3 and an update of this package was not requested. - phar-io/manifest 2.0.3 requires ext-dom * -> it is missing from your system. Install or enable PHP's dom extension. Problem 3 - phpunit/php-code-coverage is locked to version 7.0.15 and an update of this package was not requested. - phpunit/php-code-coverage 7.0.15 requires ext-dom * -> it is missing from your system. Install or enable PHP's dom extension. Problem 4 - phpunit/phpunit is locked to version 8.5.26 and an update of this package was not requested. - phpunit/phpunit 8.5.26 requires ext-dom * -> it is missing from your system. Install or enable PHP's dom extension. Problem 5 - theseer/tokenizer is locked to version 1.2.1 and an update of this package was not requested. - theseer/tokenizer 1.2.1 requires ext-dom * -> it is missing from your system. Install or enable PHP's dom extension. Problem 6 - tijsverkoyen/css-to-inline-styles 2.2.4 requires ext-dom * -> it is missing from your system. Install or enable PHP's dom extension. - laravel/framework v6.20.44 requires tijsverkoyen/css-to-inline-styles ^2.2.1 -> satisfiable by tijsverkoyen/css-to-inline-styles[2.2.4]. - laravel/framework is locked to version v6.20.44 and an update of this package was not requested. To enable extensions, verify that they are enabled in your .ini files: - /etc/php.ini - /etc/php.d/20-bz2.ini - /etc/php.d/20-calendar.ini - /etc/php.d/20-ctype.ini - /etc/php.d/20-curl.ini - /etc/php.d/20-exif.ini - /etc/php.d/20-fileinfo.ini - /etc/php.d/20-ftp.ini - /etc/php.d/20-gettext.ini - /etc/php.d/20-iconv.ini - /etc/php.d/20-json.ini - /etc/php.d/20-phar.ini - /etc/php.d/20-sockets.ini - /etc/php.d/20-sodium.ini - /etc/php.d/20-tokenizer.ini You can also run `php --ini` in a terminal to see which files are used by PHP in CLI mode. Alternatively, you can run Composer with `--ignore-platform-req=ext-dom` to temporarily ignore these required extensions.
試したこと
$ sudo yum install -y php php-dom
・domが必要と書かれていたので上記でインストールしたのですが解決できませんでした。
・今回のエラーが出る前にphpのバージョンを揃えくださいというエラーが出たのでバージョンを揃えたのですが今回のエラーが出てしまいました。
補足情報(FW/ツールのバージョンなど)
php 7.4
laravel 6
0 コメント