pangocairo 头文件未安装

pangocairo 头文件未安装

我在 WSL 2 上运行 Ubuntu 20.04。我安装了 libpangocairo,但找不到它的任何头文件。

我应该安装 pangocairo:

$ apt list --installed|grep pango

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

libpango-1.0-0/focal,now 1.44.7-2ubuntu4 amd64 [installed]
libpango-perl/focal,now 1.227-3build1 amd64 [installed]
libpangocairo-1.0-0/focal,now 1.44.7-2ubuntu4 amd64 [installed,automatic]
libpangoft2-1.0-0/focal,now 1.44.7-2ubuntu4 amd64 [installed,automatic]

但是没有任何头文件存在:

$ find . -path ./mnt -prune -o -print |grep pango
./usr/lib/x86_64-linux-gnu/libpango-1.0.so.0.4400.7
./usr/lib/x86_64-linux-gnu/libpangocairo-1.0.so.0.4400.7
./usr/lib/x86_64-linux-gnu/libpangoft2-1.0.so.0
./usr/lib/x86_64-linux-gnu/libpangocairo-1.0.so.0
./usr/lib/x86_64-linux-gnu/libpangoft2-1.0.so.0.4400.7
./usr/lib/x86_64-linux-gnu/perl5/5.30/Pango/Install/pango-perl.typemap
./usr/lib/x86_64-linux-gnu/perl5/5.30/Pango/Install/pango-perl.h
./usr/lib/x86_64-linux-gnu/perl5/5.30/Pango/Install/pango-perl-autogen.h
./usr/lib/x86_64-linux-gnu/perl5/5.30/Pango/Install/pango-perl-versions.h
./usr/lib/x86_64-linux-gnu/perl5/5.30/Pango/Install/pango.typemap
./usr/lib/x86_64-linux-gnu/libpango-1.0.so.0
./usr/share/doc/libpangocairo-1.0-0
./usr/share/doc/libpangocairo-1.0-0/changelog.Debian.gz
./usr/share/doc/libpangocairo-1.0-0/copyright
./usr/share/doc/libpango-1.0-0
./usr/share/doc/libpango-1.0-0/NEWS.gz
./usr/share/doc/libpango-1.0-0/README.md
./usr/share/doc/libpango-1.0-0/THANKS
./usr/share/doc/libpango-1.0-0/changelog.Debian.gz
./usr/share/doc/libpango-1.0-0/copyright
./usr/share/doc/libpango-perl
./usr/share/doc/libpango-perl/changelog.Debian.gz
./usr/share/doc/libpango-perl/examples
./usr/share/doc/libpango-perl/examples/cairo-simple.pl
./usr/share/doc/libpango-perl/copyright
./usr/share/doc/libpangoft2-1.0-0
./usr/share/doc/libpangoft2-1.0-0/changelog.Debian.gz
./usr/share/doc/libpangoft2-1.0-0/copyright
./var/lib/dpkg/info/libpangocairo-1.0-0:amd64.md5sums
./var/lib/dpkg/info/libpangoft2-1.0-0:amd64.triggers
./var/lib/dpkg/info/libpango-1.0-0:amd64.symbols
./var/lib/dpkg/info/libpangocairo-1.0-0:amd64.symbols
./var/lib/dpkg/info/libpangocairo-1.0-0:amd64.list
./var/lib/dpkg/info/libpango-1.0-0:amd64.triggers
./var/lib/dpkg/info/libpangoft2-1.0-0:amd64.symbols
./var/lib/dpkg/info/libpangocairo-1.0-0:amd64.shlibs
./var/lib/dpkg/info/libpango-perl.list
./var/lib/dpkg/info/libpango-1.0-0:amd64.md5sums
./var/lib/dpkg/info/libpangoft2-1.0-0:amd64.list
./var/lib/dpkg/info/libpango-perl.md5sums
./var/lib/dpkg/info/libpango-1.0-0:amd64.shlibs
./var/lib/dpkg/info/libpangoft2-1.0-0:amd64.md5sums
./var/lib/dpkg/info/libpango-1.0-0:amd64.list
./var/lib/dpkg/info/libpangocairo-1.0-0:amd64.triggers
./var/lib/dpkg/info/libpangoft2-1.0-0:amd64.shlibs
./var/cache/apt/archives/libpango-perl_1.227-3build1_amd64.deb
./var/cache/apt/archives/libpangoft2-1.0-0_1.44.7-2ubuntu4_amd64.deb

pkg-config 不返回任何内容:

$ pkg-config --cflags --libs pangocairo
Package pangocairo was not found in the pkg-config search path.
Perhaps you should add the directory containing `pangocairo.pc'
to the PKG_CONFIG_PATH environment variable
No package 'pangocairo' found

答案1

我必须安装 libpango1.0-dev 才能获取头文件。

相关内容