AlmaLinux missing extensions installed manually is easy to do. Here's an easy way to manually of install extensions. This example was for aaPanel running AlmaLinux 8.
In this example we will install bz2:
1. `cd /www/server/php/82/src/ext/bz2`
2. `/www/server/php/82/bin/phpize`
3. `./configure --with-php-config=/www/server/php/82/bin/php-config`
4. `make`
5. `make test`
6. `make install`
As stated, this method was used on aaPanel but can be adapted for other control panels and other operating systems.
Using root/putty you will most likely get some errors when running "make test". You will have to go to the app store, choose the PHP version you are working on and click "settings". Then go to "Disabled functions" and click "del" beside the errors shone when running "make Test". Restart PHP by going to the service panel in settings popup.