Install libpng-dev by entering the following commands in the terminal:
sudo apt update sudo apt install libpng-dev
PNG library - development (version 1.6)
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.