Home  >  Article  >  Backend Development  >  Why Does `go version` Show \'xgcc\' Instead of My Installed Go Version?

Why Does `go version` Show \'xgcc\' Instead of My Installed Go Version?

Linda Hamilton
Linda HamiltonOriginal
2024-11-19 20:44:02387browse

Why Does `go version` Show

Go Version Discrepancy: Printing xgcc Instead of Installed Version

When executing go version, you are encountering an unexpected output displaying "xgcc" instead of your installed Go version. Despite installing the latest version (1.4.2) from a tar file, the printed version remains xgcc.

To resolve this issue, it is likely that you have multiple versions of Go installed on your system. The printed xgcc version may be the one installed through your Ubuntu package manager, while the installed 1.4.2 version is not being recognized.

To confirm this, try removing the gccgo package installed through apt using the following command:

sudo apt-get remove gccgo

Once the gccgo package is removed, rerun go version. You should now see the expected output displaying the correct installed Go 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!

Statement:
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