query.wsgi: 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/lib/python2.6/site-packages/viewvc/bin/wsgi/query.wsgi - from package: viewvc

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