ldoc: 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/ldoc - from package: lua-ldoc

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