Php gd error on load

After installing imagick extension I got errors with gd extension that worked previously. Both files exists under: /usr/lib/php/20210902/ but not sure why it is not working out of nowhere. Not even sure how to fix it, tried reinstalling but it didnt work

May 17 20:58:04 ixt systemd[1]: Starting The PHP 8.1 FastCGI Process Manager…
May 17 20:58:04 ixt php-fpm8.1[1614369]: [17-May-2023 20:58:04] NOTICE: PHP message: PHP Warning: PHP Startup: Unable to load dynamic library ‘gd’ (tried: /usr/lib/php/20210902/gd (/usr/lib/php/20210902/gd: cannot open shared object file: No such file or directory), /usr/lib/php/20210902/gd.so (/usr/lib/php/20210902/gd.so: undefined symbol: gdImageCreateFromAvif)) in Unknown on line 0
May 17 20:58:04 ixt php-fpm8.1[1614369]: [17-May-2023 20:58:04] NOTICE: PHP message: PHP Warning: PHP Startup: Unable to load dynamic library ‘gd.so’ (tried: /usr/lib/php/20210902/gd.so (/usr/lib/php/20210902/gd.so: undefined symbol: gdImageCreateFromAvif), /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
May 17 20:58:04 ixt systemd[1]: Started The PHP 8.1 FastCGI Process Manager.

I’d assume the imagick install did something gd didn’t like…

Did you try installing via apt-get install php-gd?