File PNG.h Not Found - Linux

I am trying to run this on Linux Ubuntu. When I type do, he says

rgb_image.cc:26:24: fatal error: libpng/png.h: No such file or directory #include <libpng/png.h> 

Then I followed this to install png.h.

 sudo install libpng-dev 

But now it tells me

 install: missing destination file operand after 'libpng-dev 

What am I doing?

Please help, thanks.

+22
source share
4 answers

try it:

 sudo apt-get install libpng-dev 

Then maybe go ask askuntuntu.com ;)

+58
source

For CentOS 7 you can try

 yum -y install libpng* 
+2
source

For Centos 7 use below

  • libpng-devel : development tools for programs for working with PNG image format files

     yum install libpng-devel 
0
source

In Ubuntu 18 /usr/include/png.h moved to /usr/include/libpng/png.h ln -s/usr/include/libpng/png.h/usr/include/png.h solution: ln -s/usr/include/libpng/png.h/usr/include/png.h

Or you can configure your build to use include directory /usr/include/libpng

0
source

Source: https://habr.com/ru/post/1247303/


All Articles