pg_buildext: 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/pg_buildext - from package: postgresql-server-dev-all

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