How to Install PHP GD Extension in Ubuntu?
Hey Guys,
I will explain step by step tutorial how to install php gd extension in ubuntu. I would like to share with you ubuntu php install gd extension. We will use install php gd extension ubuntu 20.04. This article will give you a simple example of install php gd extension ubuntu.
We can install php gd extension using php-gd library. i will give you following list of commands to install php gd extension in ubuntu 22.10, ubuntu 22.04, ubuntu 21.10, ubuntu 21.04, ubuntu 20.04, ubuntu 18.04 and ubuntu 16.04 server.
Install php-gd Extension:
Solution:
You need to run both commands one by one:
sudo apt-get install php-gd
Solution for PHP 8.2
You need to run both command one by one:
sudo apt-get install php8.2-gd
Solution for PHP 8.1
You need to run both command one by one:
sudo apt-get install php8.1-gd
Solution for PHP 8.0
You need to run both command one by one:
sudo apt-get install php8.0-gd
Solution for PHP 7.4
You need to run both command one by one:
sudo apt-get install php7.4-gd
Solution for PHP 7.3
You need to run both command one by one:
sudo apt-get install php7.3-gd
Solution for PHP 7.2
You need to run both command one by one:
sudo apt-get install php7.2-gd
Restart Apache Server:
Now, restart apache2 server using following command:
sudo service apache2 restart
Check php-gd Extension Installed:
Here, we will run following command to check extension is installed or not:
php -m | grep -i gd
Output:
I hope it can help you...
Hardik Savani
I'm a full-stack developer, entrepreneur and owner of ItSolutionstuff.com. I live in India and I love to write tutorials and tips that can help to other artisan. I am a big fan of PHP, Laravel, Angular, Vue, Node, Javascript, JQuery, Codeigniter and Bootstrap from the early stage. I believe in Hardworking and Consistency.
We are Recommending you
- How to Install PHP Curl Extension in Ubuntu?
- How to Increase memory_limit in PHP Ubuntu?
- How to Increase post_max_size in PHP Ubuntu?
- How to Check Current PHP Version in Ubuntu?
- How to Upgrade PHP Version from 8.0 to 8.1 in Ubuntu?
- How to Generate SSH Key in Ubuntu Server?
- How to Check Apache Access & Error Log Files in Ubuntu Server?
- How to Whitelist/Allow IP Address in Apache Ubuntu?
- How to Restrict/Block IP Address in Apache Ubuntu?
- How to Install Laravel in Ubuntu Server?
- How to Set Up Password Authentication with Apache in Ubuntu?
- How to Install Composer in Ubuntu Server?
- How to Install Apache PHP MySQL and Phpmyadmin on Ubuntu?
- How to Change PHP Version in Ubuntu Server?