Go 1.10.3 install failed on mac

After downloading go1.10.3.darwin-amd64.pkg from golang.org and double click to install on my mac(version 10.13.5 (17F77) )。It shows install success but run “go version” cmd in terminal prints the old version number.

$ go version
go version go1.7.1 darwin/amd64

$ which go

$ ls -l /usr/local/bin/go
lrwxr-xr-x 1 username admin 25 9 24 2016 /usr/local/bin/go -> …/Cellar/go/1.7.1/bin/go

$ cd /usr/local/Cellar/go/
1.4.2 1.5 1.5.1 1.5.3 1.6 1.6.2 1.7 1.7.1

$ cd /usr/local/go/bin/
go godoc gofmt

$ ./go version
go version go1.10.3 darwin/amd64

Just a guess: You need to fix your $PATH environment variable to have /usr/local/go/bin before /usr/local/bin.

Why not using brew?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.