Skip to content

Can't install php7.0-gd #403

@jazithedev

Description

@jazithedev

I have this in my Dockerfile of php container:

FROM php:7.0-fpm

# [...]

RUN apt-get update && apt-get install -y \
    git \
    unzip \
    php7.0-gd

While building container, error occurs:

E: Unable to locate package php7.0-gd

Any idea how to install GD library because need it in my Symfony application?

Also tried and added to php Dockerfile:

RUN apt-get update && apt-get install -y \
        libfreetype6-dev \
        libjpeg62-turbo-dev \
        libmcrypt-dev \
        libpng12-dev \
    && docker-php-ext-install -j$(nproc) iconv mcrypt \
    && docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
    && docker-php-ext-install -j$(nproc) gd

Still got Exception in my Symfony 3 application:

        if (!function_exists('gd_info')) {
            throw new RuntimeException('Gd not installed');
        }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions