Question

GD Library extension not available with this PHP installation.

I need help install GD Library. i was using digitalocean spaces with app platform and i get error “GD Library extension not available with this PHP installation.”

all my config its good in local env and its work but from the app platform its show me that error.

Please help me with it. thanks.

composer.json

"require": {
        "php": "^8.0.2",
        "laravel/framework": "^9.2",
        "league/flysystem-aws-s3-v3": "^3.0",
        "ext-gd": "*",
        .....
    },

Submit an answer


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!

Sign In or Sign Up to Answer

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.

Bobby Iliev
Site Moderator
Site Moderator badge
May 23, 2022
Accepted Answer

Hi there,

Once you’ve made the change to the composer.json file, did you also run composer update to update your lock file too?

Besides that, the composer.json looks correct.

Best,

Bobby

Hi @saif0909,

You may not have it installed.

Check if installed:

$ php -m | grep gd

Install PHP-GD Library:

$ sudo apt-get install php-gd

another version:

$ sudo apt-get install php[version]-gd

Restart your webserver:

Apache

$ sudo service apache2 restart

Nginx

$ sudo service nginx restart

Hope it helps you, - Sergio Turpín

KFSys
Site Moderator
Site Moderator badge
May 23, 2022

Hi @saif0909,

If you are using a standard Droplet, you can install the GD library with yum or apt. What PHP version you need to install the GD library for?

Become a contributor for community

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

DigitalOcean Documentation

Full documentation for every DigitalOcean product.

Resources for startups and SMBs

The Wave has everything you need to know about building a business, from raising funding to marketing your product.

Get our newsletter

Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.

New accounts only. By submitting your email you agree to our Privacy Policy

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.