Go: error on import in hello world -



Go: error on import in hello world -

my test programme test.go:

package main import "fmt" func main() { fmt.printf("hello\n") }

running go run test.go finishes errors:

# io pack: cannot open $work/io/_obj/_go_.6 # strconv pack: cannot open $work/strconv/_obj/_go_.6

environment:

go version devel +715674f61ae8 tue jan 29 13:34:18 2013 -0800 linux/amd64 goarch="amd64" gobin="" gochar="6" goexe="" gogccflags="-g -o2 -fpic -m64 -pthread" gohostarch="amd64" gohostos="linux" goos="linux" gopath="/usr/local/google/home/igord/incub/web" goroot="/opt/go" gotooldir="/opt/go/pkg/tool/linux_amd64" cgo_enabled="1"

but downloaded version (featured) release 1.0.3 on go site!

resolved various in comments, record: installing binary distribution of go location other default requires setting $goroot , $gopath correctly.

getting started: install go tools related: what should values of gopath , goroot?

go

Comments

Popular posts from this blog

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

javascript - mongodb won't find my schema method in nested container -