我无法编译为 gkrellm 下载的插件

我无法编译为 gkrellm 下载的插件

当我输入命令时make输出是

/Downloads/gkrellmbgchg2-0.1.11$ make
cc -Wall -fPIC `pkg-config gtk+-2.0 --cflags` -I/usr/local/include   -c -o gkrellmbgchg.o gkrellmbgchg.c
Package gtk+-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk+-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtk+-2.0' found
In file included from /usr/include/gkrellm2/gkrellm.h:41:0,
                 from gkrellmbgchg.h:5,
                 from gkrellmbgchg.c:30:
/usr/include/gkrellm2/log.h:37:18: fatal error: glib.h: No such file or directory
compilation terminated.
<builtin>: recipe for target 'gkrellmbgchg.o' failed
make: *** [gkrellmbgchg.o] Error 1

我也试过了make install,但没什么区别。而且我知道我在正确的目录中。

答案1

根据错误信息

No package 'gtk+-2.0' found

您需要安装开发头文件和库gtk+-2.0,可以通过您最喜欢的包管理器或通过命令行使用

sudo apt install libgtk2.0-dev

相关内容