Why Does My `go version` Command Show an Old Version After Upgrading to Go 1.8?

Linda Hamilton
Release: 2024-11-11 19:21:03
Original
623 people have browsed it

Why Does My `go version` Command Show an Old Version After Upgrading to Go 1.8?

Go Version Command Displaying Old Version After Upgrade to 1.8

The issue raised here involves an inconsistency between the installed Go version and the version reported by the go version command after upgrading to Go 1.8.

Despite successful installation of Go 1.8, the terminal persistently reports version 1.7.5. The provided .bashrc configuration appears to have no apparent errors.

Troubleshooting steps taken include:

  • Verifying the installed version using the VERSION file in /usr/local/go/bin.
  • Restarting the terminal and rebooting the computer.
  • Checking IDE (Webstorm) which correctly recognizes Go 1.8.
  • Confirming the issue by attempting to use the NextResultSet() function introduced in Go 1.8.

Solution

The suggested solution involves updating Go via Homebrew. By running the commands:

brew update
brew upgrade golang
Copy after login

it prompts Homebrew to obtain the latest version of the Go package and install it. This process effectively resolved the issue.

The above is the detailed content of Why Does My `go version` Command Show an Old Version After Upgrading to Go 1.8?. 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