Home > Backend Development > Golang > Why is my `go version` command showing xgcc instead of my installed Go version?

Why is my `go version` command showing xgcc instead of my installed Go version?

Linda Hamilton
Release: 2024-11-24 09:30:13
Original
766 people have browsed it

Why is my `go version` command showing xgcc instead of my installed Go version?

"Go is printing xgcc version but not go installed version"

This error occurs when multiple versions of Go are installed on your system. In this case, the "go version" command is executed using the xgcc version installed by the Ubuntu package manager, rather than the latest version installed from the tar archive.

To fix this issue, you can confirm that you have two versions of Go installed. Remove the xgcc version using the following command:

sudo apt-get remove gccgo
Copy after login

After removing the xgcc version, verify that "go version" now correctly prints the installed version (1.4.2).

The above is the detailed content of Why is my `go version` command showing 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