rgb2pct.py: 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/rgb2pct.py - from package: gdal-python

You may install the required package with command yum install {package}

On Debian possible default full paths are:

/usr/bin/rgb2pct.py - from package: python-gdal

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