P
P
PositronNN2020-05-01 11:38:56
linux
PositronNN, 2020-05-01 11:38:56

How to fix error when installing webview library in Golang?

I run the command:
go get github.com/zserge/webview
And I get this output:

# pkg-config --cflags  -- gtk+-3.0 webkit2gtk-4.0
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
Package 'gtk+-3.0', required by 'virtual:world', not found
Package 'webkit2gtk-4.0', required by 'virtual:world', not found
pkg-config: exit status 1

Working on Linux, packages gtk+and webkit2gtkinstalled. Executed echo $PKG_CONFIG_PATHand received an empty string:
5eabdfd3f2aa7888347023.png
Tell me how to fix the error.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Evgeny Mamonov, 2020-05-01
@PositronNN

You need to install "devel" packages, something like gtk+-devel and libwebkit2gtk-4.0-dev.
Different Linux distributions may have different names.
The reason for the error is that in addition to installing the packages themselves, you also need packages that at least have headers (.h) so that you can compile your project / webview.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question