ecpg: 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/ecpg - from package: postgresql-devel

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

On Debian possible default full paths are:

/usr/bin/ecpg - from package: libecpg-dev

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