Cairo "Could not find libpng in the pkg-config search path"
Asked Answered
H

3

6

I'm trying to install GTK-DFB and cairo is a requirement. When I try to build it from source, it throws:

checking for cairo's PNG functions feature... 
configure: WARNING: Could not find libpng in the pkg-config search path
checking whether cairo's PNG functions feature could be enabled... no
configure: error: recommended PNG functions feature could not be enabled

Ideas?

Thanks

Hadlock answered 29/5, 2010 at 0:19 Comment(0)
P
5

You need to have the libpng development packages installed; Installation is distribution dependent, but for debian derivatives following should be enough:

apt-get install libpng12-dev
Purim answered 29/5, 2010 at 0:24 Comment(1)
I think on fedora, the package is called libpng-develPurim
D
7

For me it helped to export the following variable in the shell:

export png_REQUIRES="libpng"

Credit to this post

Dixil answered 7/8, 2018 at 7:24 Comment(2)
I had to do export png_REQUIRES="libpng16"Brilliance
This worked for me. png_REQUIRES="libpng" ./configureCamelopardalis
P
5

You need to have the libpng development packages installed; Installation is distribution dependent, but for debian derivatives following should be enough:

apt-get install libpng12-dev
Purim answered 29/5, 2010 at 0:24 Comment(1)
I think on fedora, the package is called libpng-develPurim
T
2

If you're on Ubuntu, another much faster solution is to do:

apt-get build-dep gtk+2.0
Trigeminal answered 7/6, 2010 at 14:8 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.