no required module provides package 报错:
PS E:\go\go-webkit-master> go run example/webview.go
example\webview.go:5:2: no required module provides package github.com/mattn/go-gtk/gtk: go.mod file not found in current directory or any parent directory; see 'go help modules'
执行:
go env -w GO111MODULE=auto
go mod init example
go get xxxx 缺失的mod
之后在运行go程序即可
go run example/webview.go
若中间出现:
PS E:\go\go-webkit-master> go get github.com/mattn/go-webkit/webkit # pkg-config --cflags ?-- pango pkg-config: exec: "pkg-config": executable file not found in %PATH% # pkg-config --cflags ?-- glib-2.0 gobject-2.0 pkg-config: exec: "pkg-config": executable file not found in %PATH%
?参看:windows安装pkg-config - 情三 - 博客园
|