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

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