Reputation: 21
I am trying to install moodle but it shows php-gd extension is missing/should be enabled.
However the gd is already installed and latest, and when I command php -v
I get the following error as indicated below.
PHP Warning: PHP Startup: Unable to load dynamic library 'gd.so' (tried: /usr/lib64/php/modules/gd.so (/lib64/libraqm.so.0: undefined symbol: hb_ft_font_set_load_flags), /usr/lib64/php/modules/gd.so.so (/usr/lib64/php/modules/gd.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP 7.3.17 (cli) (built: Apr 14 2020 08:29:22) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.17, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.3.17, Copyright (c) 1999-2018, by Zend Technologies
I did a lot of editing but I could not find a single solution. Please help
Upvotes: 2
Views: 6775
Reputation: 202
I had the same problem:
# php --version
PHP Warning: PHP Startup: Unable to load dynamic library 'gd' (tried: /usr/lib64/php/modules/gd (/usr/lib64/php/modules/gd: cannot open shared object file: No such file or directory), /usr/lib64/php/modules/gd.so (/lib64/libraqm.so.0: undefined symbol: hb_ft_font_set_load_flags)) in Unknown on line 0
PHP 7.2.32 (cli) (built: Jul 8 2020 07:33:50) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.2.32, Copyright (c) 1999-2018, by Zend Technologies
A quick search in google told me that hb_ft_font_set_load_flags
comes from HarfBuzz (https://harfbuzz.github.io/harfbuzz-hb-ft.html).
I installed it with yum install harfbuzz
, and after that the warning is gone:
php --version
PHP 7.2.32 (cli) (built: Jul 8 2020 07:33:50) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.2.32, Copyright (c) 1999-2018, by Zend Technologies
Upvotes: 5
Reputation: 91
Run:
yum install libraqm-devel
[root@* ~]# yum provides '*/libraqm.so*'
Repository epel is listed more than once in the configuration
libraqm-0.7.0-4.el7.x86_64 : Complex Textlayout Library
Repo : epel
Matched from:
Filename : /usr/lib64/libraqm.so.0.700.0
Filename : /usr/lib64/libraqm.so.0
libraqm-devel-0.7.0-4.el7.x86_64 : Complex Textlayout Library
Repo : epel
Matched from:
Filename : /usr/lib64/libraqm.so
[root@* ~]# ll /usr/lib64/libraqm.so*
lrwxrwxrwx 1 root root 18 Jul 20 23:20 /usr/lib64/libraqm.so -> libraqm.so.0.700.0
lrwxrwxrwx 1 root root 18 Jul 18 19:00 /usr/lib64/libraqm.so.0 -> libraqm.so.0.700.0
-rwxr-xr-x 1 root root 19792 Jan 11 2020 /usr/lib64/libraqm.so.0.700.0
libraqm.so
provided by libraqm-devel
.
Install libraqm-devel
will also install freetype and harfbuzz, which provide hb_ft_font_set_load_flags
.
Upvotes: 3