opencv_traincascade: 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_traincascade - from package: opencv

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

On Debian possible default full paths are:

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

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