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

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

On Debian possible default full paths are:

/usr/bin/optipng - from package: optipng

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