今天在Ubuntu16.04里面遇到这样的问题:
# pkg-config --cflags gtk+-3.0 appindicator3-0.1
Package gtk+-3.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk+-3.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtk+-3.0' found
Package appindicator3-0.1 was not found in the pkg-config search path.
Perhaps you should add the directory containing `appindicator3-0.1.pc'
to the PKG_CONFIG_PATH environment variable
No package 'appindicator3-0.1' found
pkg-config: exit status 1
从上面信息分析,我应该是缺少gtk+-3.0和appindicator3-0.1!
经过不断搜索和尝试,最终解决了上述问题,只要在shell终端里执行一条命令就可以了!
命令:
sudo apt-get install libgtk-3-dev libappindicator3-dev -y
执行完这个命令后,shell终端里面会滚动安装的信息,不用管,如果成功安装,安装信息中应该没有任何错误提示!安装完毕后,回到提示符状态!
这两项安装完毕后,无须进行任何配置,也不需要重新启动系统,gtk+-3.0和appindicator3-0.1就可以使用了!