ncurses5-config: 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/ncurses5-config - from package: ncurses-devel

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

On Debian possible default full paths are:

/usr/bin/ncurses5-config - from package: ncurses-bin

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