ypmatch: 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/ypmatch - from package: yp-tools

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

On Debian possible default full paths are:

/usr/bin/ypmatch - from package: nis

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