ysrc / yulong-hids-archived

[archived] 一款实验性质的主机入侵检测系统
Other
2.15k stars 583 forks source link

Error compile web binary #60

Closed Aoshee closed 5 years ago

Aoshee commented 5 years ago

Hello, I compile succes, but execute is error:

`./web flag redefined: graceful panic: ./web flag redefined: graceful

goroutine 1 [running]: flag.(*FlagSet).Var(0xc420068120, 0xae4860, 0xdf1c91, 0xa6e982, 0x8, 0xa7ff73, 0x21) /usr/local/go/src/flag/flag.go:810 +0x540 flag.BoolVar(0xdf1c91, 0xa6e982, 0x8, 0xc420190200, 0xa7ff73, 0x21) /usr/local/go/src/flag/flag.go:589 +0x72 github.com/astaxie/beego/grace.init.0() /home/exam/src/github.com/astaxie/beego/grace/grace.go:93 +0x60`

neargle commented 5 years ago

Which is the version of beego in your system?

Aoshee commented 5 years ago

I using stable v1.10.0 and v1.9.2, same error.

neargle commented 5 years ago

It is weird. When you go build the web module, golang will use the source of third-party package in vendor, like https://github.com/ysrc/yulong-hids/tree/master/web/vendor/github.com/astaxie/beego.

Aoshee commented 5 years ago

Yep. How to fix error??

neargle commented 5 years ago

Print working directory of yulong. Is that in {gopath}/src?

neargle commented 5 years ago

Look https://stackoverflow.com/questions/41319633/vendor-folder-not-used-with-go-build