lastdb: 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 Debian possible default full paths are:

/usr/bin/lastdb - from package: last-align

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