yacc: 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/yacc - from package: byacc

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

On Debian possible default full paths are:

/usr/lib/plan9/bin/yacc - from package: 9base

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