unsupported GOOS/GOARCH pair darwin/x86_64 on mac installed from package

2,571 views
Skip to first unread message

Dan Kortschak

unread,
Aug 31, 2016, 8:19:35 PM8/31/16
to golang-nuts
One of my users has struck a problem with an install of go1.7 from the
packages at [1] that has me baffled. I don't use a mac, so I've depleted
my knowledge of what might be going on here. Can anyone help?

thanks
Dan

The OS is 10.11.6 on a macbook.

$ go run hello.go
cmd/go: unsupported GOOS/GOARCH pair darwin/x86_64
$ go version
go version go1.7 darwin/amd64
$ which go
/usr/local/go/bin/go
$ go env
GOARCH="x86_64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH=""
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
CC="clang"
GOGCCFLAGS="-fPIC -fno-caret-diagnostics -Qunused-arguments
-fmessage-length=0
-fdebug-prefix-map=/var/folders/hp/y4ntgxvx1r58r_0730q_c9bm0000gp/T/go-build799346258=/tmp/go-build -gno-record-gcc-switches -fno-common"
CXX="clang++"
CGO_ENABLED="0"


[1]https://storage.googleapis.com/golang/go1.7.darwin-amd64.pkg

Ian Lance Taylor

unread,
Aug 31, 2016, 8:37:44 PM8/31/16
to Dan Kortschak, golang-nuts
On Wed, Aug 31, 2016 at 5:19 PM, Dan Kortschak
<dan.ko...@adelaide.edu.au> wrote:
> One of my users has struck a problem with an install of go1.7 from the
> packages at [1] that has me baffled. I don't use a mac, so I've depleted
> my knowledge of what might be going on here. Can anyone help?

> $ go run hello.go
> cmd/go: unsupported GOOS/GOARCH pair darwin/x86_64

> GOARCH="x86_64"

Set GOARCH in the environment to amd64, not x86_64. Or don't bother
to set it at all.

Ian

Dave Cheney

unread,
Aug 31, 2016, 8:37:53 PM8/31/16
to golang-nuts
It looks like they've exported GOARCH=x86_64 which is the linux preferred word for amd64. They should either remove the GOARCH setting or set it to GOARCH=amd64

Dan Kortschak

unread,
Aug 31, 2016, 8:46:52 PM8/31/16
to Ian Lance Taylor, golang-nuts
On Wed, 2016-08-31 at 17:37 -0700, Ian Lance Taylor wrote:
> Set GOARCH in the environment to amd64, not x86_64. Or don't bother
> to set it at all.
>
Thanks Ian. Just went through and clean out many GO* vars from
his .profile.

Reply all
Reply to author
Forward
0 new messages