Beego: flag provided but not defined: -goversion

Created on 9 Sep 2017  路  7Comments  路  Source: astaxie/beego

github.com/astaxie/beego/grace

flag provided but not defined: -goversion
usage: compile [options] file.go...
-% debug non-static initializers
-+ compiling runtime
-B disable bounds checking
-D path
set relative path for local imports
-E debug symbol export
-I directory
add directory to import search path
-K debug missing line numbers
-N disable optimizations
-S print assembly listing
-V print compiler version
-W debug parse tree after type checking
-asmhdr file
write assembly header to file
-bench file
append benchmark times to file
-buildid id
record id as the build id in the export metadata
-complete
compiling complete package (no C or assembly)
-cpuprofile file
write cpu profile to file
-d list
print debug information about items in list
-dynlink
support references to Go symbols defined in other shared libraries
-e no limit on number of errors reported
-f debug stack frames
-h halt on error
-i debug line number stack
-importmap definition
add definition of the form source=actual to import map
-installsuffix suffix
set pkg directory suffix
-j debug runtime-initialized variables
-l disable inlining
-largemodel
generate code that assumes a large memory model
-linkobj file
write linker-specific object to file
-live
debug liveness analysis
-m print optimization decisions
-memprofile file
write memory profile to file
-memprofilerate rate
set runtime.MemProfileRate to rate
-msan
build code compatible with C/C++ memory sanitizer
-nolocalimports
reject local (relative) imports
-o file
write output to file
-p path
set expected package import path
-pack
write package file instead of object file
-r debug generated wrappers
-race
enable race detector
-s warn about composite literals that can be simplified
-shared
generate code that can be linked into a shared library
-traceprofile file
write an execution trace to file
-trimpath prefix
remove prefix from recorded source file paths
-u reject unsafe code
-v increase debug verbosity
-w debug type checking
-wb
enable write barrier (default true)

Most helpful comment

Did you recently install another Go version? Maybe Go 1.9?

Your $GOROOT might point to the old Go installation while you are trying to run Go 1.9 tools.

All 7 comments

hi @forging2012 maybe you are install other go when you install some program .the exec is more.
please check on your os

> where go
/usr/local/bin/go
/usr/local/go/bin/go

then remove one

mv /usr/local/bin/go /usr/local/bin/go2

Did you recently install another Go version? Maybe Go 1.9?

Your $GOROOT might point to the old Go installation while you are trying to run Go 1.9 tools.

bingo
I update my golang from 1.8 to 1.9 . so that.
Now I clean the env , so It works.
THKS ALL.

I'm having this error, but I don't have a $GOROOT set.

Now I clean the env

Not sure what this is supposed to mean?

Where is your Go installed? Did you recently install a new Go version?

I am having the same error. @marsbear

$ geth version
WARN [08-27|17:29:29.500] Sanitizing cache to Go's GC limits       provided=1024 updated=665
Geth
Version: 1.8.15-unstable
Git Commit: 1acefafe2201ba061a58b51afd7a7edf4aa0f120
Architecture: amd64
Protocol Versions: [63 62]
Network Id: 1
Go Version: go1.11
Operating System: linux
GOPATH=
GOROOT=/usr/local/go
$ which go
/usr/bin/go
$ go version
go version go1.11 linux/amd64
$ echo $GOROOT
(Blank line)


Instead using --syncmode fastsolved my problem.

Was this page helpful?
0 / 5 - 0 ratings