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.
go
Comments
Post a Comment