docker-php-extension-installer: Unable to install extensions on PHP 8.1
Version of install-php-extensions
v.1.5.37
Error description
The command install-php-extensions gd intl pdo_mysql opcache zip is not working in a php:8.1-fpm docker container. I checked and each of these extensions appears to be supported for building in PHP 8.1 so I’m not sure the issue.
I get the following output after trying to install the extensions:
failed to solve: executor failed running [/bin/sh -c install-php-extensions gd intl pdo_mysql opcache zip]: exit code: 1
Along with a bunch of messages like this:
#0 111.9 [0/1] Re-running CMake...
#0 111.9 --- aom_configure: Detected CPU: x86_64
#0 112.4 -- Configuring done
#0 112.5 -- Generating done
#0 112.5 -- Build files have been written to: /tmp/src/tmp.vsLIEPDPzl/my.build
#0 112.5 [0/1] Re-running CMake...
#0 112.5 --- aom_configure: Detected CPU: x86_64
#0 113.0 -- Configuring done
#0 113.1 -- Generating done
#0 113.1 -- Build files have been written to: /tmp/src/tmp.vsLIEPDPzl/my.build
#0 113.1 [0/1] Re-running CMake...
#0 113.1 --- aom_configure: Detected CPU: x86_64
#0 113.6 -- Configuring done
#0 113.7 -- Generating done
#0 113.7 -- Build files have been written to: /tmp/src/tmp.vsLIEPDPzl/my.build
#0 113.7 [0/1] Re-running CMake...
#0 113.7 --- aom_configure: Detected CPU: x86_64
#0 114.2 -- Configuring done
#0 114.3 -- Generating done
#0 114.3 -- Build files have been written to: /tmp/src/tmp.vsLIEPDPzl/my.build
#0 114.3 [0/1] Re-running CMake...
#0 114.3 --- aom_configure: Detected CPU: x86_64
#0 114.8 -- Configuring done
#0 114.8 -- Generating done
#0 114.9 -- Build files have been written to: /tmp/src/tmp.vsLIEPDPzl/my.build
#0 114.9 [0/1] Re-running CMake...
#0 114.9 --- aom_configure: Detected CPU: x86_64
#0 115.4 -- Configuring done
#0 115.4 -- Generating done
#0 115.5 -- Build files have been written to: /tmp/src/tmp.vsLIEPDPzl/my.build
Docker image
php:8.1-fpm - same result on php:8.1-cli
Minimal Dockerfile
FROM php:8.1-fpm
COPY --from=mlocati/php-extension-installer:latest /usr/bin/install-php-extensions /usr/bin/
RUN apt update && apt install git unzip -yq && \
apt-get clean autoclean; apt-get autoremove --yes; rm -rf /var/lib/{apt,dpkg,cache,log}/
RUN install-php-extensions gd intl pdo_mysql opcache zip
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 27 (8 by maintainers)
i have use it:
I’ve got same error only with gd extension and only on docker desktop for windows with wsl 2 backend, may be it wil help to reproduce and fix this error
I’m not aware of any official mirror, and for security reasons I wouldn’t adopt any unofficial one…
Aaaaand pecl is back. If you’re still running into this issue then it’s a separate issue and i’m sorry for derailing.
I’m getting the same error but different output.
failed to solve: executor failed running [/bin/sh -c install-php-extensions @composer pdo_pgsql pgsql igbinary redis xdebug]: exit code: 1In my case I’m getting connection timeout trying to connect to https://pecl.php.net. Maybe temporary pecl server issue. Re-running failed on a different extension, so pecl seems to be finicky right now. I’ve had this working for quite awhile and just ran into this for the first time right now…
Maybe unrelated since your output messages are different but thought I’d mention.
Edit: seems down