[aws ec2] maatwebsite/excel 3.1.26 requires phpoffice/phpspreadsheet ^1.15 -> satisfiable by phpoffice/phpspreadsheet[1.15.0, 1.16.0].

composer updateした時に、エラーになる。

$ composer update
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

Problem 1
– maatwebsite/excel 3.1.26 requires phpoffice/phpspreadsheet ^1.15 -> satisfiable by phpoffice/phpspreadsheet[1.15.0, 1.16.0].
– maatwebsite/excel[3.1.20, …, 3.1.25] require phpoffice/phpspreadsheet ^1.14 -> satisfiable by phpoffice/phpspreadsheet[1.14.0, 1.14.1, 1.15.0, 1.16.0].
– maatwebsite/excel[3.1.18, …, 3.1.19] require phpoffice/phpspreadsheet ^1.10 -> satisfiable by phpoffice/phpspreadsheet[1.10.0, …, 1.16.0].
– maatwebsite/excel[3.1.7, …, 3.1.17] require phpoffice/phpspreadsheet ^1.6 -> satisfiable by phpoffice/phpspreadsheet[1.6.0, …, 1.16.0].
– maatwebsite/excel[3.1.0, …, 3.1.6] require phpoffice/phpspreadsheet ^1.4 -> satisfiable by phpoffice/phpspreadsheet[1.4.0, …, 1.16.0].
– maatwebsite/excel 3.2.x-dev requires phpoffice/phpspreadsheet ^1.11 -> satisfiable by phpoffice/phpspreadsheet[1.11.0, …, 1.16.0].
– maatwebsite/excel 3.1.x-dev requires phpoffice/phpspreadsheet ^1.16 -> satisfiable by phpoffice/phpspreadsheet[1.16.0].
– phpoffice/phpspreadsheet[1.4.0, …, 1.16.0] require ext-gd * -> it is missing from your system. Install or enable PHP’s gd extension.
– Root composer.json requires maatwebsite/excel ^3.1 -> satisfiable by maatwebsite/excel[3.1.0, …, 3.2.x-dev].

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-dom.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-mbstring.ini
– /etc/php.d/20-mysqlnd.ini
– /etc/php.d/20-pdo.ini
– /etc/php.d/20-phar.ini
– /etc/php.d/20-simplexml.ini
– /etc/php.d/20-sockets.ini
– /etc/php.d/20-sqlite3.ini
– /etc/php.d/20-tokenizer.ini
– /etc/php.d/20-xml.ini
– /etc/php.d/20-xmlwriter.ini
– /etc/php.d/20-xsl.ini
– /etc/php.d/20-zip.ini
– /etc/php.d/30-mysqli.ini
– /etc/php.d/30-pdo_mysql.ini
– /etc/php.d/30-pdo_sqlite.ini
– /etc/php.d/30-xmlreader.ini
You can also run `php –ini` inside terminal to see which files are used by PHP in CLI mode.

よく見ると
require ext-gd * -> it is missing from your system. Install or enable PHP’s gd extension.

ext-gdが足りないと書いてある。
$ sudo yum install php-gd.x86_64

$ sudo su –
$ cd /var/www/hoge
$ composer update
$ exit

めっちゃ焦るな。侮ってた自分がアホや。インフラエンジニアって大変やな。