shp2img: 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/shp2img - from package: mapserver

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

On Debian possible default full paths are:

/usr/bin/shp2img - from package: mapserver-bin

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