• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Question show error unable to load dynamic library 'gd2'

Gandani

New Pleskian
Server operating system version
centos 7
Plesk version and microupdate number
Plesk Obsidian Web Pro Edition Version 18.0.45 Update #2
I Have A Problem, when update or install composer show error unable to load dynamic library 'gd2'
 

Attachments

  • Screenshot 2022-08-09 091627.jpg
    Screenshot 2022-08-09 091627.jpg
    119.4 KB · Views: 4
Looks like you have a record in PHP ini file for loading missing gd2.so module.
First make sure that is is so with:

Code:
# /opt/plesk/php/7.4/bin/php -m | grep gd

you should see something like:

Code:
PHP Warning:  PHP Startup: Unable to load dynamic library 'gd2' (tried: /opt/plesk/php/7.4/lib64/php/modules/gd2 (/opt/plesk/php/7.4/lib64/php/modules/gd2: cannot open shared object file: No such file or directory), /opt/plesk/php/7.4/lib64/php/modules/gd2.so (/opt/plesk/php/7.4/lib64/php/modules/gd2.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
gd

Find ini file with incorrect record:

Code:
# egrep -R gd2 /opt/plesk/php/7.4/etc/ -s

Then open ini file and comment line with record like:

extension=gd2
 
Back
Top