Q: You must have installed GD library with --with-jpeg-dir=DIR option 
PHP Settings Check
You must have installed GD library with --with-jpeg-dir=DIR option.

Getting the issue when I install Magento

A: Need to install GD library
Run the below command on cmd
sudo apt-get install php7.1-gd 
sudo service apache2 restart

change php7.1 according to your current php version
