Report this

What is the reason for this report?

How to install php7.4-gd in App Platform container?

Posted on October 6, 2020

Is there a way to install php7.4-gd in the default container build step?

I´ve tried:

sudo apt-get install -y php7.4-gd

Unfortunately I´m getting an error:

sudo: effective uid is not 0, is /usr/bin/sudo on a file system with the 'nosuid' option set or an NFS file system without root privileges?

Without sudo:

E: List directory /var/lib/apt/lists/partial is missing. - Acquire (13: Permission denied)


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

You can install the GD extension by adding ext-gd to composer.json like so:

composer.json
{
    "require": {
        "ext-gd": "*"
    }
}

The PHP build environment uses the Heroku PHP Buildpack, so you can refer to the official documentation for more information.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.