query.fcgi: 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.fcgi - from package: viewvc

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