How can we compile filbeat code in windows or linux?


(shubham jain) #1

Please help me ?

Getting Error :

PS C:\Users\shubham.jain\Downloads\beats-6.4.2\beats-6.4.2\filebeat> go build

main.go:23:2: cannot find package "github.com/elastic/beats/filebeat/cmd" in any of:
C:\Go\src\github.com\elastic\beats\filebeat\cmd (from $GOROOT)
C:\Users\shubham.jain\go\src\github.com\elastic\beats\filebeat\cmd (from $GOPATH)


(Andrew Kroh) #2

Looks like you do not have the beats project on your GOPATH. https://www.elastic.co/guide/en/beats/devguide/current/beats-contributing.html#setting-up-dev-environment

The beats directory needs to be found at %GOPATH%\src\github.com\elastic\beats where GOPATH is the value returned from go env GOPATH.


(shubham jain) #3

Thanks, @andrewkroh

Please suggest me how many project need to commit code in my local repository.

Have i to commit code full (golang src + libbeat + filebeat + vendor) in my local repository?

is there any go build management tool to do that, or will need to same ? manually will have to add these folder inside golang src.

Please help.