"go: version "go1.9" does not match go tool version "go1.9.1" Error Resolution
While attempting to execute a sample Hello World code, you encountered an error stating, "compile: version "go1.9" does not match go tool version "go1.9.1"". Despite possessing Go version 1.9.1 on your system, this error persists.
To resolve this issue, consider the following steps:
If you installed Go using Homebrew on macOS, you may need to modify the $GOROOT in your shell configuration file (e.g., .bashrc, .zshrc):
export GOROOT=/usr/local/opt/go/libexec
This error can also occur when upgrading from Go version 1.9 to 1.9.1. Although previous recommendations suggested setting $GOROOT, it is not typically required.
Additional Notes:
It's important to note that this error is not a bug, and proper configuration will resolve it. For further information and troubleshooting tips, refer to the discussions in the original post.
The above is the detailed content of Why Am I Getting 'go: version 'go1.9' does not match go tool version 'go1.9.1'' Error Despite Having Go 1.9.1 Installed?. For more information, please follow other related articles on the PHP Chinese website!