lastcd: 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/lastcd - from package: ears

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