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

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