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

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