开罗:“在pkg-config搜索路径中找不到libpng”

6

我正在尝试安装GTK-DFB,但需要使用cairo。当我尝试从源代码构建时,它会报错:

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

有什么想法吗?
谢谢
3个回答

7

对我来说,在shell中导出以下变量有所帮助:

export png_REQUIRES="libpng"

此帖子的来源


2
我必须执行 export png_REQUIRES="libpng16"。 - Har
这对我有用。 png_REQUIRES="libpng" ./configure - Nels

5

您需要安装libpng开发包;安装方式因发行版而异,但对于Debian衍生版,以下步骤应该足够:

apt-get install libpng12-dev

1
我认为在 Fedora 上,该软件包被称为 libpng-devel - azatoth

2
如果您正在使用Ubuntu,另一个更快的解决办法是执行以下操作:
apt-get build-dep gtk+2.0

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接