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

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

On Debian possible default full paths are:

/usr/bin/sg_opcodes - from package: sg3-utils

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