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

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