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

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

On Debian possible default full paths are:

/usr/bin/opencv_createsamples - from package: libopencv-dev

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