ncursesw5-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/ncursesw5-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/ncursesw5-config - from package: ncurses-bin

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