last: 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/last - from package: sysvinit-tools

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

On Debian possible default full paths are:

/usr/bin/last - from package: sysvinit-utils

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