sg_write_buffer: 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_write_buffer - 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_write_buffer - from package: sg3-utils

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