Code cracker
Code cracker

Reputation: 396

How to download php7.2-gd extension in ubuntu 21.04?

I want to install gd extension in my current php-project(php version is 7.2.34) for that i use this command sudo apt-get install php7.2-gd it's throwing following error and it's not showing in the list when i run php -m command ,How to install gd extension please help me to fix this issue..

Error

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 php7.2-gd : Depends: libjpeg62-turbo (>= 1.3.1) but it is not installable
E: Unable to correct problems, you have held broken packages.

Upvotes: 0

Views: 2167

Answers (1)

Joseph
Joseph

Reputation: 6269

This package depends on libjpeg62-turbo so you need to install it first

wget http://ftp.debian.org/debian/pool/main/libj/libjpeg-turbo/libjpeg62-turbo_1.5.1-2_amd64.deb
sudo apt-get install ./libjpeg62-turbo_1.5.1-2_amd64.deb

after that, you could install your package easily

sudo apt-get install php7.2-gd

Upvotes: 3

Related Questions