shantanuo
shantanuo

Reputation: 32296

Install go package with dependencies

I had some issues with gopath configuration. I was able to resolve the go path issue. But getting this error...

[root@localhost mysqlbeat]# go get  github.com/adibendahan/mysqlbeat

# github.com/adibendahan/mysqlbeat/beater
/root/go/src/src/github.com/adibendahan/mysqlbeat/beater/mysqlbeat.go:289:7: b.Events undefined (type *beat.Beat has no field or method Events)
/root/go/src/src/github.com/adibendahan/mysqlbeat/beater/mysqlbeat.go:303:7: b.Events undefined (type *beat.Beat has no field or method Events)
/root/go/src/src/github.com/adibendahan/mysqlbeat/beater/mysqlbeat.go:326:5: b.Events undefined (type *beat.Beat has no field or method Events)

How do I correctly install go package along with all it's dependencies?


Update:

I downloaded the package and tried to run it.Different error this time...

[root@localhost mysqlbeat]# make
go build
can't load package: /root/go/src/src/github.com/adibendahan/mysqlbeat/main.go:8:2: non-standard import "github.com/adibendahan/mysqlbeat/beater" in standard package "src/github.com/adibendahan/mysqlbeat"
make: *** [build] Error 1

Upvotes: 1

Views: 808

Answers (1)

Shmulik Klein
Shmulik Klein

Reputation: 3914

Check out the How to Build section on README.md on mysqlbeat.

mysqlbeat uses Glide for dependency management. Check this for installing glide.

After installing Glide, clone the mysqlbeat repository and run:

$ glide update --no-recursive
$ make

If you still want to import this repository by go get, clone the repo and then run go get ./... from its root directory.

Upvotes: 1

Related Questions