cgi: 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/cgi - from package: viewvc

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