bam2bedgraph: 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/bam2bedgraph - from package: libbio-samtools-perl

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