1

I Can't figure out how to install php-gd for PHP7.2.11. Is there any way to install/enable GD extension in xampp Ubuntu 18.04? I checked the php.ini file but I can't find php_gd2.so line.Any suggestions??

2 Answers 2

3

Under Linux you have ".so" files. You can install it very easy over the package manager. Check before if the package is installed:

dpkg -l|grep php7.2-gd

If not then install it via apt.

apt install php7.2-gd

If you have an oder version then use apt-get install. It is possible that this package is used and installed by default that is thy you should check, if it's already installed.

1
  • I am using ubuntu 18.04 and sudo apt install php7.2-gd worked.
    – Sani Kamal
    Commented Aug 31, 2019 at 12:18
0
sudo add-apt-repository ppa:ondrej/php
sudo apt-get install php7.2-gd
1
  • 2
    Suraj RaoLuis Sambrano, while this code snippet may solve the problem, it doesn't explain why or how it answers the question. Please include an explanation for your code, as that really helps to improve the quality of your post. Remember that you are answering the question for readers in the future, and those people might not know the reasons for your code suggestion. Commented Feb 1, 2022 at 8:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.