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

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

On Debian possible default full paths are:

/usr/bin/ack - from package: ack-grep

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