install php70-gd on ubuntu
PHP7 packages for Ubuntu including php7.0-gd
can be installed via PPA for PHP by Ondřej Surý:
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
Next, install the desired version:
sudo apt-get install php7.0-gd
# or
sudo apt-get install php7.1-gd
# or
sudo apt-get install php7.2-gd
# or
sudo apt-get install php7.3-gd
# or
sudo apt-get install php7.4-gd
EDIT:
As MacroMan stated, under Ubuntu 16.04 you don't need to add the repository any more. Simply issuing sudo apt-get install php7.0-gd
works.
Enable GD support on PHP 7.2 in a Ubuntu 18.04
This command will install the GD extension only if PHP 7.2 is already installed.
If not, it will also install php7.2-common
since it is a dependency.
On a machine without PHP 7.2:
sudo apt install php7.2-gd
Reading package lists... Done
[...]
The following additional packages will be installed:
php7.2-common
The following NEW packages will be installed:
php7.2-common php7.2-gd
and with PHP 7.2 installed:
sudo apt install php7.2-gd
Reading package lists... Done
[...]
The following NEW packages will be installed:
php7.2-gd
Once installed, the GD config files will be created under /etc/php/7.2/(fpm|cli...)/conf.d
and should be named xx-gd.ini
.
These config files are loaded after your main php.ini
and contain extension specific settings (in your case, GD settings).
Related Topics
Customize Addresses Fields on Woocommerce My Account and Checkout
Prevent PHP Script from Being Flooded
How to Use Curl and PHP Simple HTML Dom Parser with Object
How to Select Rows in MySQL Starting at a Given Row Number
PHP 5.4 Pdo Could Not Connect to MySQL 4.1+ Using the Old Insecure Authentication
Warning: "Continue" Targeting Switch Is Equivalent to "Break". Did You Mean to Use "Continue 2"
Which Method Is Preferred Strstr or Strpos
How to Declare a Method Static and Nonstatic in PHP
How to Post Button Value to PHP
PHP Get Content of Http 400 Response
JSON_Decode() Returns Null Issues
How to Get MySQL 8 to Run with Laravel
How to Easily Convert Dates from Utc via PHP
PHP Soap Client for Uk Mail Webservice API
Automatically Refresh Token Using Google Drive API with PHP Script