gpgsm: command not found

Have You tried accessing the binary with the full path?

Maybe Your $PATH variable doesn't contain the default paths? echo $PATH should give something like:

[root@server ~]# echo $PATH
/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

If it's empty, You may set the PATH variable with this command

export PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin"

On CentOS possible default full paths are:

/usr/bin/gpgsm - from package: gnupg2-smime

You may install the required package with command yum install {package}

On Debian possible default full paths are:

/usr/bin/gpgsm - from package: gpgsm

You may install the required package with command apt-get install {package}
Error in other languages:
gpgsm: bevel nie gevind nie
gpgsm: comandă negăsită
gpgsm: comando não encontrado
gpgsm: commande introuvable
gpgsm: command not found
gpgsm: käsku ei ole
gpgsm: không tìm thấy lệnh
gpgsm: komanda nerasta
gpgsm: Kommando nicht gefunden.
gpgsm: kommandot finns inte
gpgsm: komut yok
gpgsm: nie znaleziono polecenia
gpgsm: níor aimsíodh an t-ordú
gpgsm: no se encontró la orden
gpgsm: no s'ha trobat l'ordre
gpgsm: opdracht niet gevonden
gpgsm: parancs nem található
gpgsm: perintah tidak ditemukan
gpgsm: príkaz nenájdený
gpgsm: příkaz nenalezen
gpgsm: команда не найдена
gpgsm: командата не е открита
gpgsm: 命令找不到
gpgsm: コマンドが見つかりません