Home > Backend Development > Golang > 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
Release: 2024-11-19 20:44:02
Original
436 people have browsed it

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

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!

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