Dockerでphpをインストールしようとした時に依存関係で失敗した
Dockerfile内のphpのインストールで失敗したので、内容と対処方法のメモ。
起きたエラー
#17 22.95 Error: Package: libzip5-1.8.0-2.el7.remi.x86_64 (remi-safe) #17 22.95 Requires: libzstd(x86-64) >= 1.3.6 #17 22.95 Available: libzstd-1.3.3-1.amzn2.x86_64 (amzn2-core) #17 22.95 libzstd(x86-64) = 1.3.3-1.amzn2 #17 22.95 Available: libzstd-1.3.3-1.amzn2.0.1.x86_64 (amzn2-core) #17 22.95 libzstd(x86-64) = 1.3.3-1.amzn2.0.1 #17 22.95 Error: Package: libzip5-1.8.0-2.el7.remi.x86_64 (remi-safe) #17 22.95 Requires: libzstd(x86-64) >= 1.3.6 #17 22.95 Available: libzstd-1.3.3-1.amzn2.x86_64 (amzn2-core) #17 22.95 libzstd(x86-64) = 1.3.3-1.amzn2 #17 22.95 Installing: libzstd-1.3.3-1.amzn2.0.1.x86_64 (amzn2-core) #17 22.95 libzstd(x86-64) = 1.3.3-1.amzn2.0.1 #17 22.95 You could try using --skip-broken to work around the problem #17 23.12 You could try running: rpm -Va --nofiles --nodigest ------ executor failed running [/bin/sh -c yum -y install --enablerepo=remi-php72 git unzip aws-cli php72 php72-php-fpm php72-php-cli php72-php-pdo php72-php-mysqlnd php72-php-xml php72-php-mbstring php72-php-soap php72-php-opcache php72-php-openssl php72-php-intl php72-php-simplexml php72-php-xdebug php72-php-devel php72-php-dom php72-php-zip php72-php-gd php72-php-pecl-redis php72-php-xdebug && yum -y clean all && systemctl enable php72-php-fpm]: exit code: 1 ERROR: Service 'app' failed to build : Build failed
対応方法
phpのインストールをしている箇所に、--disableplugin=priorities のオプションを追加したところうまくいった。
失敗していたコマンド
yum -y install --enablerepo=remi-php72 \ git \ unzip \ aws-cli \ php72 \ php72-php-fpm \ php72-php-cli \ php72-php-pdo \ php72-php-mysqlnd \ php72-php-xml \ php72-php-mbstring \ php72-php-soap \ php72-php-opcache \ php72-php-openssl \ php72-php-intl \ php72-php-simplexml \ php72-php-xdebug \ php72-php-devel \ php72-php-dom \ php72-php-zip \ php72-php-gd \ php72-php-pecl-redis \ php72-php-xdebug
成功したコマンド
yum -y install --enablerepo=remi-php72 --disableplugin=priorities \ git \ unzip \ aws-cli \ php72 \ php72-php-fpm \ php72-php-cli \ php72-php-pdo \ php72-php-mysqlnd \ php72-php-xml \ php72-php-mbstring \ php72-php-soap \ php72-php-opcache \ php72-php-openssl \ php72-php-intl \ php72-php-simplexml \ php72-php-xdebug \ php72-php-devel \ php72-php-dom \ php72-php-zip \ php72-php-gd \ php72-php-pecl-redis \ php72-php-xdebug