Home > Back-end >  invalid package name/package file "docker-php-ext-configure" (Apple silicon)
invalid package name/package file "docker-php-ext-configure" (Apple silicon)

Time:10-30

Can't build up my project on my new laptop (macbook m1). It was built great on my previous machine with Intel.

Here's the part of my Dockerfile

FROM php:7.4-apache

ENV COMPOSER_ALLOW_SUPERUSER 1

ARG GOLANG_VERSION=1.16.5

RUN apt-get update && apt-get install -y \
        cron \
        curl \
        wget \
        git \
        libfreetype6-dev \
        libzip-dev \
        libonig-dev \
        libxslt-dev \
        libicu-dev \
        libmcrypt-dev \
        libxml2-dev \
        libsodium-dev \
        libpq-dev \
        zlib1g-dev \
        libpcre3-dev \
        libcurl4-openssl-dev \
        libmagickwand-dev --no-install-recommends \
        pkg-config \
        libssl-dev \
    && a2enmod \
        rewrite \
    && pecl install \
        imagick \

RUN docker-php-ext-configure \
            gd \
            pgsql -with-pgsql=/usr/local/pgsql \
            exif \
        && docker-php-ext-install \
            gd \
            mysqli \
            pdo \
            pdo_pgsql \
            pgsql \
            sockets \
            zip \
            mbstring \
            xml \
            intl \
            curl \
            exif \
        && docker-php-ext-enable \
            imagick \
            exif

Here's the part of docker-compose.yaml

version: '3.1'

services:

  web:
    build: ./docker/web
    env_file:
      - .env
    environment:
      - APACHE_RUN_USER=#1000
    volumes:
      - ${WEB_ROOT_PATH}:/var/www/html/
    ports:
      - ${WEB_PORT}:80
    working_dir: ${WEB_WORKING_DIR}
    restart: unless-stopped

Then I do docker-compose up --build -d and after 400 seconds of waiting here's what I got:

#0 106.6 Processing triggers for mailcap (3.69) ...
#0 106.6 Processing triggers for libglib2.0-0:arm64 (2.66.8-1) ...
#0 106.6 No schema files found: doing nothing.
#0 106.6 Processing triggers for libc-bin (2.31-13 deb11u4) ...
#0 106.6 Setting up libcairo2-dev:arm64 (1.16.0-5) ...
#0 106.7 Setting up libgdk-pixbuf-2.0-dev:arm64 (2.42.2 dfsg-1 deb11u1) ...
#0 106.7 Setting up librsvg2-dev:arm64 (2.50.3 dfsg-1) ...
#0 106.7 Setting up libmagickcore-6.q16-dev:arm64 (8:6.9.11.60 dfsg-1.3) ...
#0 106.7 Setting up libmagickwand-6.q16-dev:arm64 (8:6.9.11.60 dfsg-1.3) ...
#0 106.7 Setting up libmagickwand-dev (8:6.9.11.60 dfsg-1.3) ...
#0 106.7 Processing triggers for libgdk-pixbuf-2.0-0:arm64 (2.42.2 dfsg-1 deb11u1) ...
#0 106.8 Enabling module rewrite.
#0 106.8 To activate the new configuration, you need to run:
#0 106.8   service apache2 restart
#0 169.3 No releases available for package "pecl.php.net/imagick"
#0 229.3 No releases available for package "pecl.php.net/RUN"
#0 289.4 No releases available for package "pecl.php.net/gd"
#0 349.5 No releases available for package "pecl.php.net/pgsql"
#0 409.6 No releases available for package "pecl.php.net/exif"
#0 409.6 parsePackageName(): only one version/state delimiter "-" is allowed in "docker-php-ext-configure"
#0 409.6 invalid package name/package file "docker-php-ext-configure"
#0 409.6 Attempting to discover channel "-with-pgsql=/usr/local"...
#0 409.6 Attempting fallback to https instead of http on channel "-with-pgsql=/usr/local"...
#0 409.6 unknown channel "-with-pgsql=/usr/local" in "-with-pgsql=/usr/local/pgsql"
#0 409.6 invalid package name/package file "-with-pgsql=/usr/local/pgsql"
#0 409.6 install failed
------
failed to solve: executor failed running [/bin/sh -c apt-get update && apt-get install -y         cron         curl         wget         git         libfreetype6-dev         libzip-dev         libonig-dev         libxslt-dev         libicu-dev         libmcrypt-dev         libxml2-dev         libsodium-dev         libpq-dev         zlib1g-dev         libpcre3-dev         libcurl4-openssl-dev         libmagickwand-dev --no-install-recommends         pkg-config         libssl-dev     && a2enmod         rewrite     && pecl install         imagick RUN docker-php-ext-configure             gd             pgsql -with-pgsql=/usr/local/pgsql             exif         && docker-php-ext-install             gd             mysqli             pdo             pdo_pgsql             pgsql             sockets             zip             mbstring             xml             intl             curl             exif         && docker-php-ext-enable             imagick             exif]: exit code: 1

I don't really know what's wrong here, I just tried to do the same on my previous machine and it was built fine.

CodePudding user response:

pgsql -with-pgsql=/usr/local/pgsql
i guess it should be
pgsql --with-pgsql=/usr/local/pgsql

CodePudding user response:

So my problem was solved by itself and all containers were built when I turn on VPN.

I don't really know why it works like this but it wasn't be possible to download packages from pecl without using VPN.

  • Related