hp-query: 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/hp-query - from package: hplip

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

On Debian possible default full paths are:

/usr/bin/hp-query - from package: hplip

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