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


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?

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.

1 Like

This was the solution:

1 Like

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

Thanks! It works!