Go Version Not Matching Installed Version
In Go, the go version command displays information about the installed Go version. However, you're encountering an issue where it prints the xgcc version instead of your actual installed version.
To troubleshoot this problem, let's delve into your system configuration.
The provided environment variables indicate that you have a dual installation of Go. One version is installed through the Ubuntu package manager, and the other is installed from the tar version. This explains why you're seeing the xgcc version printed.
Resolving the Issue
To ensure that the correct Go version is printed, you need to remove the gccgo package installed by the Ubuntu package manager.
Steps to Remove gccgo:
sudo apt-get remove gccgo
Once gccgo is removed, re-run the go version command to verify that it now displays the correct installed version (1.4.2).
The above is the detailed content of Why Does `go version` Show xgcc Instead of My Installed Go Version?. For more information, please follow other related articles on the PHP Chinese website!