[I'm new to PHP, but I believe that this was an issue in 7.2 as well]

Both 'xbase' and 'xshare' are installed.

What got me started was trying to run a DokuWiki CLI command
```
# ./bin/plugin.php usermanager list          
PHP Warning:  PHP Startup: Unable to load dynamic library 'gd.so' (tried: 
/usr/local/lib/php-8.1/modules/gd.so (Cannot load specified object), 
/usr/local/lib/php-8.1/modules/gd.so.so (File not found)) in Unknown on line 0
✗ (user authentication not available)
```

Similar is seen when running FPM manually:
```
# /usr/local/sbin/php-fpm-8.1
[12-Apr-2023 15:57:30] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable 
to load dynamic library 'gd.so' (tried: /usr/local/lib/php-8.1/modules/gd.so 
(Cannot load specified object), /usr/local/lib/php-8.1/modules/gd.so.so (File 
not found)) in Unknown on line 0
[12-Apr-2023 15:57:30] WARNING: Nothing matches the include pattern 
'/etc/php-fpm.d/*.conf' from /etc/php-fpm.conf at line 143.
```
FWIW, my `/etc/php-fpm.d/` directory is empty.


Checking if the DSO exists (yup, it's there):
```
# ls -l /usr/local/lib/php-8.1/modules/gd.so
-rw-r--r--  1 root  www  135320 Apr 11 16:50 
/usr/local/lib/php-8.1/modules/gd.so
```

Checking for link dependencies (huh?!):
```
# ldd /usr/local/lib/php-8.1/modules/gd.so
/usr/local/lib/php-8.1/modules/gd.so:
Cannot load specified object
/usr/local/lib/php-8.1/modules/gd.so: exit status 1
```

Running debug:
```
# env LD_DEBUG=1 php-8.1                                                        
                                  
<snip>
loading: libfreetype.so.30.2 required by /usr/local/lib/php-8.1/modules/gd.so
dlopen: failed to open libfreetype.so.30.2
unload_shlib called on /usr/local/lib/php-8.1/modules/gd.so
unload_shlib unloading on /usr/local/lib/php-8.1/modules/gd.so
dlopen: /usr/local/lib/php-8.1/modules/gd.so: done (failed).
</snip>
```

Looking for "libfreetype.so.30.2":
```
# find /usr -name libfreetype.so.30.2
/usr/X11R6/lib/libfreetype.so.30.2
```

Checking for link dependencies (looks fine):
```
# ldd /usr/X11R6/lib/libfreetype.so.30.2    
/usr/X11R6/lib/libfreetype.so.30.2:
        Start            End              Type  Open Ref GrpRef Name
        00000e61e844c000 00000e61e851d000 dlib  1    0   0      
/usr/X11R6/lib/libfreetype.so.30.2
        00000e6202607000 00000e6202625000 rlib  0    1   0      
/usr/lib/libz.so.7.0
```

Any suggestions?

Thanks!
Kent



Reply via email to