libpng-config command not found

In this troubleshooting guide we learn how to fix libpng-config command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

libpng-config: command not found

or when using sudo you get the following error message

sudo: libpng-config: command not found

Solutions to libpng-config: command not found

How To Fix libpng-config: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu libpng-config is provided by libpng-dev package.

libpng-dev is:

libpng is a library implementing an interface for reading and writing PNG (Portable Network Graphics) format files.

This package contains the header and development files needed to build programs and packages using libpng.

To fix this problem, we can install more using the command below.

sudo apt-get -y install libpng-dev

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install libpng-dev.

sudo apt -y install libpng-dev

Or if you have aptitude installed you can use the following command.

sudo aptitude install libpng-dev

Summary

In this tutorial we learn how to fix libpng-config command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.