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

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

On Debian possible default full paths are:

/usr/sbin/opensm - from package: opensm

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