a2query: 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 Debian possible default full paths are:

/usr/sbin/a2query - from package: apache2

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