apxs2: 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/bin/apxs2 - from package: apache2-dev

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