I am using Wine in Linux Mint 21 which is Ubuntu 22.04 (jammy). Also PHP from ondrej. Did not figure out at first that there is a conflict. Default PHP is 8.1, using FPM. I needed PHP8.3, could install other modules but not key PHP8.3-GD due to libgd3 version mismatch. Finally could not resolve, cleared but system was left broken wihout GD which is needed for Apache site.
PHP-GD does not work. During many attempts, including forcing and editing DEB, I mistakenly force installed new version of libgd3 2.3.3 from ubuntu 24.04 which broke the system. Later reinstalled libgd3 as Ubuntu 22.04 version 2.3.0 but PHP does not load GD.
` PHP Startup: Unable to load dynamic library 'gd.so' (tried: /usr/lib/php/20210902/gd.so (libtiff.so.6: cannot open shared object file: No such file or directory) `
gd.so is present after installation. `ldd /usr/lib/php/20210902/gd.so` :
/usr/lib/php/20210902/gd.so: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.38' not found (required by /lib/x86_64-linux-gnu/libgd.so.3)
libtiff.so.6 => not found
Purging and reinstalling php-gd {or even libgd3) did not help. Ubuntu 22.04 has libtiff5, libtiff6 is wrong reference from 24.04. I guess that GLIBC_2.38 is similar, as my version is 2.35. Is it possible that php-gd is still influenced by that 24.04 references? Where does it come from? How to restore that?
EDIT: I can cheat to avoid libtiff.so.6. So more important is this:
PHP Startup: Unable to load dynamic library 'gd.so' (tried: /usr/lib/php/20210902/gd.so (/lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.38' not found (required by /lib/x86_64-linux-gnu/libgd.so.3)), /usr/lib/php/20210902/gd.so.so (/usr/lib/php/20210902/gd.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
Not sure what is going on:
% l /lib/x86_64-linux-gnu/libm.*
-rw-r--r-- 1 root root 132 Sep 17 17:26 /lib/x86_64-linux-gnu/libm.a
-rw-r--r-- 1 root root 140 Sep 17 17:26 /lib/x86_64-linux-gnu/libm.so
-rw-r--r-- 1 root root 919K Sep 17 17:26 /lib/x86_64-linux-gnu/libm.so.6
% l /lib/x86_64-linux-gnu/libgd.*
lrwxrwxrwx 1 root root 15 Dec 3 22:46 /lib/x86_64-linux-gnu/libgd.so.3 -> libgd.so.3.0.11
-rw-r--r-- 1 root root 397K Nov 14 2024 /lib/x86_64-linux-gnu/libgd.so.3.0.8
-rw-r--r-- 1 root root 401K Apr 16 2024 /lib/x86_64-linux-gnu/libgd.so.3.0.11
There are many related topics out there , but they are different, like need to have same version for amd64 and i386, or need to clean /usr/local/lib/. ondrej archived Github which also had Discussions. I first posted at https://askubuntu.com/questions/1560438/php-gd-broken-with-wrong-dependancies-how-to-restore because there was related question there, to receive a comment that site is for pure Ubunt only. I do not see that as relevant in this case, but moving here.