Install Command
Install Go versions using the install
command.
Usage
gvm install [version]
gvm install --latest
Description
The install command allows you to download and install specific Go versions or the latest stable release. It automatically handles:
- Download verification via SHA256 checksum
- Progress tracking during download
- Automatic extraction and cleanup
- Metadata tracking of installed versions
Examples
Install a specific version
Install the latest stable version
Flags
Flag |
Description |
--latest |
Install the latest stable Go version |
Installation Process
When you run gvm install
, the following happens:
- Download: The specified Go version is downloaded from the official Go download server
- Verification: SHA256 checksum is verified to ensure integrity
- Extraction: The downloaded archive is extracted to
~/.gvm/[version]
- Cleanup: The downloaded archive is automatically removed
- Registration: The version is registered in the local metadata database
Error Handling
The install command provides detailed error messages for common issues:
- Invalid version format
- Network connectivity problems
- Checksum verification failures
- Insufficient disk space
- list - List available/installed versions
- use - Switch to an installed version
- uninstall - Remove an installed version