mlocati/docker-php-extension-installer

E: There are problems and -y was used without --force-yes

Closed this issue · 2 comments

Lenny4 commented

Version of install-php-extensions

2.0.5

Error description

In my Dockerfile I got:

ARG PHP_VERSION=5.6.27

FROM php:${PHP_VERSION}-fpm

ARG DEBIAN_FRONTEND=noninteractive

COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/

RUN install-php-extensions gd xdebug memcached bcmath calendar ftp gettext iconv mcrypt simplexml sockets soap ctype mssql pdo pdo_dblib exif

When I try to build my image I got the error:

=> ERROR [stage-0 3/5] RUN install-php-extensions gd xdebug memcached bcmath calendar ftp gettext iconv mcrypt simplexml sockets soap ctype mssql pdo pdo_dblib exif                                                                                                                                             12.5s
------                                                                                                                                                                                                                                                                                                                  
 > [stage-0 3/5] RUN install-php-extensions gd xdebug memcached bcmath calendar ftp gettext iconv mcrypt simplexml sockets soap ctype mssql pdo pdo_dblib exif:                                                                                                                                                         
#0 0.755 install-php-extensions v.2.0.5                                                                                                                                                                                                                                                                                 
#0 0.755 #StandWithUkraine                                                                                                                                                                                                                                                                                              
#0 0.830 ### WARNING Module already installed: ftp ###                                                                                                                                                                                                                                                                  
#0 0.833 ### WARNING Module already installed: iconv ###                                                                                                                                                                                                                                                                
#0 0.836 ### WARNING Module already installed: simplexml ###
#0 0.842 ### WARNING Module already installed: ctype ###
#0 0.845 ### WARNING Module already installed: pdo ###
#0 2.033 Updating channel "pecl.php.net"
#0 2.186 Update of Channel "pecl.php.net" succeeded
#0 2.294 Get:1 http://security.debian.org jessie/updates InRelease [44.9 kB]
#0 2.382 Ign http://security.debian.org jessie/updates InRelease
#0 2.409 Ign http://deb.debian.org jessie InRelease
#0 2.419 Get:2 http://security.debian.org jessie/updates/main amd64 Packages [992 kB]
#0 2.472 Get:3 http://deb.debian.org jessie-updates InRelease [16.3 kB]
#0 2.505 Ign http://deb.debian.org jessie-updates InRelease
#0 2.547 Get:4 http://deb.debian.org jessie Release.gpg [1652 B]
#0 2.610 Get:5 http://deb.debian.org jessie-updates/main amd64 Packages [20 B]
#0 2.676 Get:6 http://deb.debian.org jessie Release [77.3 kB]
#0 2.782 Ign http://deb.debian.org jessie Release
#0 2.845 Get:7 http://deb.debian.org jessie/main amd64 Packages [9098 kB]
#0 4.181 Fetched 10.2 MB in 1s (5229 kB/s)
#0 4.181 Reading package lists...
#0 4.964 W: GPG error: http://security.debian.org jessie/updates InRelease: The following signatures were invalid: KEYEXPIRED 1668892417 The following signatures couldn't be verified because the public key is not available: NO_PUBKEY AA8E81B4331F7F50
#0 4.964 W: GPG error: http://deb.debian.org jessie-updates InRelease: The following signatures were invalid: KEYEXPIRED 1668891673
#0 4.964 W: GPG error: http://deb.debian.org jessie Release: The following signatures were invalid: KEYEXPIRED 1668891673
#0 7.154 ### INSTALLING REQUIRED PACKAGES ###
#0 7.154 # Packages to be kept after installation: freetds-common libfreetype6 libjpeg62-turbo libmcrypt4 libmemcached11 libmemcachedutil2 libpng12-0 libsybdb5 libvpx1 libx11-6 libx11-data libxau6 libxcb1 libxdmcp6 libxpm4
#0 7.154 # Packages to be used only for installation: freetds-dev libct4 libfreetype6-dev libhashkit-dev libhashkit2 libjpeg62-turbo-dev libmcrypt-dev libmemcached-dev libpng12-dev libpthread-stubs0-dev libsasl2-dev libvpx-dev libx11-dev libxau-dev libxcb1-dev libxdmcp-dev libxml2-dev libxpm-dev x11proto-core-dev x11proto-input-dev x11proto-kb-dev xorg-sgml-doctools xtrans-dev zlib1g-dev
#0 9.660 WARNING: The following packages cannot be authenticated!
#0 9.660   zlib1g libsasl2-modules-db libsasl2-2 libxml2 freetds-common libct4
#0 9.660   libpng12-0 libfreetype6 libhashkit2 libmemcached11 libmemcachedutil2
#0 9.660   libsybdb5 libvpx1 libxau6 libxdmcp6 libxcb1 libx11-data libx11-6 libxpm4
#0 9.660   freetds-dev zlib1g-dev libpng12-dev libfreetype6-dev libhashkit-dev
#0 9.660   libjpeg62-turbo libjpeg62-turbo-dev libmcrypt4 libmcrypt-dev libsasl2-dev
#0 9.660   libmemcached-dev libpthread-stubs0-dev libvpx-dev xorg-sgml-doctools
#0 9.660   x11proto-core-dev libxau-dev libxdmcp-dev x11proto-input-dev x11proto-kb-dev
#0 9.660   xtrans-dev libxcb1-dev libx11-dev libxml2-dev libxpm-dev
#0 9.661 E: There are problems and -y was used without --force-yes

Docker image

php:5.6.27-fpm

Minimal Dockerfile

ARG PHP_VERSION=5.6.27

FROM php:${PHP_VERSION}-fpm

ARG DEBIAN_FRONTEND=noninteractive

COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/

RUN install-php-extensions gd xdebug memcached bcmath calendar ftp gettext iconv mcrypt simplexml sockets soap ctype mssql pdo pdo_dblib exif

I tried quite hard to fix those KEYEXPIRED errors.
The only solution I found that's working is something like this:

echo 'APT::Get::AllowUnauthenticated "true";' >/etc/apt/apt.conf.d/99-install-php-extensions

But of course I won't add it to the script (it's makes the system unsafe).

If you find a solution please let me know.

I'm closing this issue since it's strictly related to this project: it's an apt issue.

#703 is the best fix I found for this issue