3

我需要在我的 perl + gtk2 应用程序中使用 WebKit。在 CPAN 上找到了一个包 Gtk2::WebKit,但无法正常工作。

cpan> install Gtk2::WebKit

给出以下输出:

Package webkit-1.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `webkit-1.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'webkit-1.0' found
at inc/Module/Install/PRIVATE/WebKit.pm line 24
*** can not find package webkit-1.0
*** check that it is properly installed and available in PKG_CONFIG_PATH
at inc/Module/Install/PRIVATE/WebKit.pm line 24
No 'Makefile' created'YAML' not installed, will not store persistent state
FLORA/Gtk2-WebKit-0.09.tar.gz
/usr/bin/perl Makefile.PL INSTALLDIRS=site -- NOT OK
Running make test
Make had some problems, won't test
Running make install
Make had some problems, won't install
Failed during this command:
FLORA/Gtk2-WebKit-0.09.tar.gz                : writemakefile NO -- No 'Makefile' created

看起来好像 cpan 无法找到 webkit,但我不确定如何解决这个问题(我第一次使用 perl 和 cpan)。

环境:perl 5.12.4,ubuntu 11.10

4

3 回答 3

7

安装libwebkitgtk-develsudo apt-get install libwebkitgtk-devel

于 2011-12-19T02:28:55.020 回答
6

sudo apt-get install libwebkitgtk-dev

于 2013-06-11T11:36:45.797 回答
5

对于 Debian/Ubuntu 和类似系统,要安装的软件包名称是libwebkitgtk-dev。对于 OpenSuse 和其他基于 RPM 的系统,包名称是libwebkitgtk-devel

于 2014-11-30T00:03:48.183 回答