Go: x/vgo: vgo requires go 1.10 but VGOROOT=… is not a valid Go 1.10 source tree

Created on 20 Apr 2018  Â·  6Comments  Â·  Source: golang/go

What version of Go are you using (go version)?

$ vgo version
vgo requires Go 1.10 but VGOROOT=/usr/lib/go-1.10 is not a Go 1.10 source tree
$ go version
go version go1.10.1 linux/amd64

Does this issue reproduce with the latest release?

This is directly after go get -u golang.org/x/vgo

What operating system and processor architecture are you using (go env)?

GOARCH="amd64"
GOBIN=""
GOCACHE="/home/nmelzer/.cache/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/nmelzer/go"
GORACE=""
GOROOT="/usr/lib/go-1.10"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/go-1.10/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build230138715=/tmp/go-build -gno-record-gcc-switches"

vgo env fails the same way as vgo version fails.

What did you do?

vgo build, vgo env, vgo version and others. I've only found vgo help to work among the commands I use daily…

What did you expect to see?

A working compiler.

What did you see instead?

vgo requires Go 1.10 but VGOROOT=/usr/lib/go-1.10 is not a Go 1.10 source tree
FrozenDueToAge

Most helpful comment

dupe of #24773

Issue is that where you are getting go from is not including all the files required by vgo.

From https://github.com/golang/go/issues/24773#issuecomment-380280572 you can try the following commands or download go directly from https://golang.org/dl/

sudo mkdir /usr/lib/go-1.10/api
sudo touch /usr/lib/go-1.10/api/go1.10.txt

All 6 comments

dupe of #24773

Issue is that where you are getting go from is not including all the files required by vgo.

From https://github.com/golang/go/issues/24773#issuecomment-380280572 you can try the following commands or download go directly from https://golang.org/dl/

sudo mkdir /usr/lib/go-1.10/api
sudo touch /usr/lib/go-1.10/api/go1.10.txt

Haven't seen that other issue. Thank you, will try to manually install.

Will official go docker containers be sufficient to run vgo?

I'm not entirely sure, but I assume they are using the same releases as on https://golang.org/dl/

Okay, I'll see it when I try to deploy (which will probably not be today) ;) Thank you!

Was this page helpful?
0 / 5 - 0 ratings