Skip to content

curl extension fails to install on php:7.3.12-fpm-stretch #922

@jelovac

Description

@jelovac

Hi,

I wanted to upgrade the base image from php:7.3.9-fpm-stretch to php:7.3.12-fpm-stretch however the docker build fails with the following error message:

Configuring for:
PHP Api Version: 20180731
Zend Module Api No: 20180731
Zend Extension Api No: 320180731
configure: error: unrecognized options: --with-openssl

The Dockerfile example:

FROM php:7.3.12-fpm-stretch

# Install necessary packages
RUN \
	apt-get update \
	&& apt-get install -y \
		build-essential \
		cron \
		git \
		locales \
		openssl \
		pkg-config \
		unzip

# Install PHP extensions which depend on external libraries
RUN \
    apt-get update \
    && echo 'Installing PHP curl extension' \
    && apt-get install -y --no-install-recommends libssl-dev libcurl4-openssl-dev \
    && docker-php-ext-configure curl --with-curl --with-openssl=/usr \
    && docker-php-ext-install -j$(nproc) curl

Remarks:

  • changed only the FROM part, everything else in the Dockerfile is the same between the new and old version
  • tested the build again with old version, builds successfully without issues
  • tried to replace --with-openssl flag to --with-openssl-dir =>same error type

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionUsability question, not directly related to an error with the image

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions