flamegraph.pl: 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 CentOS possible default full paths are:

/usr/bin/flamegraph.pl - from package: perl-Devel-NYTProf

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