query.pl: 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/share/doc/libattean-perl/examples/bin/query.pl - from package: libattean-perl
/usr/share/doc/librdf-query-perl/examples/bin/query.pl - from package: librdf-query-perl

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