softhsm: 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/softhsm - from package: softhsm

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

On Debian possible default full paths are:

/usr/bin/softhsm - from package: softhsm

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