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?

Patricia Arquette
Release: 2024-11-12 13:56:02
Original
1010 people have browsed it

Why Am I Getting

"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
Copy after login

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!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template