Gnupg extension is causing issues

– Server operating system name and version Ubuntu 20.04
– Web server name and version Nginx latest
– Database server name and version MYSQL 5.7.33 in a docker container
– Php version 7.2-fpm
– Passbolt version Latest
I have installed passbolt and configured it. And its working properly.
I have configured SMTP and test mail worked. But at the creation of users, the invite email was not sent.
upon checking health, I figuered the error was gnupg extension.
I installed it via pecl and tried several different ways.
Still, when I
./bin/cake EmailQueue.preview
it gives the following error:

Failed to find a CLI version of PHP; falling back to system standard php executable Warning: PHP Startup: Unable to load dynamic library 'gnupg.so' (tried: /usr/lib/php/20200930/gnupg.so (/usr/lib/php/20200930/gnupg.so: cannot open shared object file: No such file or directory), /usr/lib/php/20200930/gnupg.so.so (/usr/lib/php/20200930/gnupg.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 Fatal error: You must enable the gnupg extension to use Passbolt. in /var/www/passbolt/config/requirements.php on line 31 Call Stack: 0.0001 396048 1. {main}() /var/www/passbolt/bin/cake.php:0 0.0002 399624 2. require('/var/www/passbolt/config/requirements.php') /var/www/passbolt/bin/cake.php:4 0.0002 399624 3. trigger_error($message = 'You must enable the gnupg extension to use Passbolt.', $error_level = 256) /var/www/passbolt/config/requirements.php:31
I have checked
Checklist
[ ] I have read intro post: About the Installation Issues category
[y ] I have read the tutorials, help and searched for similar issues
[ y] I provide relevant information about my server (component names and versions, etc.)
[ y] I provide a copy of my logs and healthcheck
[ y] I describe the steps I have taken to trouble shoot the problem
[ y] I describe the steps on how to reproduce the issue

Hi @fahadkhancchughtai welcome to the forum.

Make sure to search for previous posts that include gnupg.so PHP Gnupg library is not installed - #2 by remy