Graphics Draw or GD library is an open-source library for dynamic creation of images. It is used to create and manipulate image files in a variety of different image formats, including GIF, PNG, JPEG, WBMP, and XPM.
This package for PHP 7 can be installed via the PPA by Ondrej Surý. To install php7.0-gd on ubuntu, using the terminal. Follow these steps
- First, you need to update your system with unsupported packages from this untrusted PPA by adding ppa:ondrej/php to your system’s Software Sources. This step is required only for Ubuntu 15 or less. Type the below command in your terminal and when prompted press ENTER to enable the repository
sudo add-apt-repository ppa:ondrej/php.
- Next, update your repositories using the command
sudo apt-get update
- Now, we are ready to install the gd library for PHP. Run the below command to install the required version of php7.x-gd, where x should be replaced by the version required for you to install.
sudo apt-get install php7.x-gd for php version 7.0 replace x with 0, sudo apt-get install php7.0-gd
Note: PHP v7.0 is outdated and is no longer supported, so the above command to install php7.0-gd may not work. But, installing php7.4-gd will work fine. Since it is relatively newer and officially supported.
- How to Install ImageMagick and Imagick PHP extension in Ubuntu ?
- How to install Apache server in Ubuntu ?
- How to Install and Configure MongoDB in Ubuntu?
- How to Install php-curl in Ubuntu ?
- LAMP installation and important PHP configurations on Ubuntu
- How to setup cron jobs in Ubuntu
- How to make sure that Apache service keeps running in Ubuntu
- Creating custom domain name instead of localhost in Ubuntu
- How to Setup Browsersync for Web Development in Ubuntu?
- How to install the previous version of node.js and npm ?
- install command in Linux with examples
- How to install XAMPP on Windows ?
- How to enable PHP's openssl extension to install Composer ?
- How to Install R Studio on Windows and Linux?
- How to download and install Java for 64 bit machine
- What is the meaning of --save for NPM install ?
- How to Install Ruby on Rails on Windows and Linux?
- How to install and use lite-server in your Project ?
- How to install modules without npm in node.js ?
- How to install and set up a WAMP server ?
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.