-
Couldn't load subscription status.
- Fork 2
POPOS Go (step 1)
Instructions to install go including easily managing multiple versions that is compatible with bazel.
Install Prerequisites: Ensure that you have all the required packages installed:
sudo apt-get update
sudo apt-get install curl git mercurial make binutils bison gcc build-essential -yInstall gvm : Install gvm using the installation script:
bash < <(curl -sSL https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer)Load gvm
into Your Shell: Add the following line to your shell configuration file ( ~/.bashrc or ~/.zshrc ):
source "$HOME/.gvm/scripts/gvm"Then, reload your shell configuration:
source ~/.bashrc # or ~/.zshrc if you are using ZshInstall Go Bootstrap Version ( go1.4 ): gvm needs a bootstrap version of Go to install other versions. Install the bootstrap version with the -B flag:
gvm install go1.4 -BVerify the Bootstrap Version Installation: Ensure that the bootstrap version is correctly installed and available:
gvm use go1.4go version # This should output the version of Go 1.4Install Desired Versions of Go: Now you can install other versions of Go. This step should work if the bootstrap version is correctly set up:
gvm install go1.17Use the Installed Version: Set the desired version of Go as the default:
gvm use go1.17 --defaultVerify the Installation: Check that the correct version of Go is being used:
go version