Installing php7.1-gd on the php:7.1.4-apache container


#1

Hi,

i’m trying to install gd on the php7.1.4-apache container. Unfortunately it errors out with

E: Unable to locate package php7.1-gd
E: Couldn’t find any package by regex 'php7.1-gd’
Exited with code 100

Does anybody know how to fix this?


#2

Got a little bit further.

needed to add this step:

  - run:
      name: Install PHP Extensions
      command: docker-php-ext-install gd

But now it fails with : configure: error: png.h not found.


#3

This was the solution: https://twitter.com/iWader/status/888357599426605056


#4

Just to make this complete, your docker-php-ext-install was missing a sudo. THe full solution in my case:

      - run: sudo apt-get install -y libpng-dev

      - run:
          name: Install PHP Extensions
          command: sudo docker-php-ext-install gd

#5

Thanks! It works!


#6