xmkmf: 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/xmkmf - from package: imake

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

On Debian possible default full paths are:

/usr/bin/xmkmf - from package: xutils-dev

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