webkit/webkit.h: No such file or directory

只愿长相守 提交于 2019-12-24 04:41:10

问题


I am trying to create Vala program with WebKit. Here is how I compile it:

valac --pkg gtk+-3.0 --pkg granite --pkg glib-2.0 --pkg webkitgtk-3.0  <filenames>

and in one file I included WebKit:

using WebKit;

The compiler says:

fatal error: webkit/webkit.h: No such file or directory
#include <webkit/webkit.h>

I heard that this file should be in /usr/include/webkit/webkit.h, but it isn't there.

I'm using elementary OS Freya x64.

Can you tell me which packages I need to install or what else I need to do? I already have libwebkitgtk-3.0-0, libwebkitgtk-3.0-common and libwebkit2gtk-3.0-25 installed.


回答1:


You also need libwebkitgtk-dev. In general, you're always going to need a corresponding -dev package for each of the --pkg options.




回答2:


Actually I think I figured it out. I have somehow disabled Ubuntu main repository and apt-get was trying to download libwebkitgtk-3.0-dev from ppa:webkit-team, where it has version 1.8 and was not compatible with my other packages. Enabling main repository and removing ppa:webkit-team fixed this.



来源:https://stackoverflow.com/questions/26400755/webkit-webkit-h-no-such-file-or-directory

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!