libpng12-config: 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/libpng12-config - from package: libpng-devel

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

On Debian possible default full paths are:

/usr/bin/libpng12-config - from package: libpng12-dev

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