Reputation: 453
I am trying to run this in linux ubuntu. When I type make it 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 its telling me
install: missing destination file operand after ‘libpng-dev’
What do I do?
Please help, thanks.
Upvotes: 44
Views: 88146
Reputation: 124
For Centos 8, I got the below warning message :
Warning: Header file <png.h> not found. This host has no libpng library. Disabling support for PNG framebuffers.
and I solved it using the command :
sudo yum install libpng-devel
Upvotes: 1
Reputation: 2345
With Ubuntu 18, /usr/include/png.h
moved to /usr/include/libpng/png.h
A workaround is this:
ln -s /usr/include/libpng/png.h /usr/include/png.h
Or you can configure your build to use include directory /usr/include/libpng
Upvotes: 3
Reputation: 39
For Centos 7 use below
libpng-devel
: Development tools for programs to manipulate PNG image format files
yum install libpng-devel
Upvotes: 0
Reputation: 8395
try rather this:
sudo apt-get install libpng-dev
Then maybe go askubuntu.com ;)
Upvotes: 114