Go 1.24+ Installation & Verification: Setting Up Your ADK Go Dev Environment
Table of Contents
Go 1.24+ Installation & Verification: Environment Setup Step One
Get a new machine, first thing is to get the Go environment ready. This article covers every step from download to verification, and explains several easy-to-stumble spots.
Prerequisites: Understanding Go 1.24+ Requirements
ADK Go requires Go 1.24.4 or higher. Not 1.23, not 1.24.0—it must be 1.24.4 and above.
The reason is ADK Go relies on newer Go features. An older version will directly cause compilation errors. Better install the right version from the start.
Verify current Go version:
go version
# Expected output (example):
# go version go1.24.4 darwin/arm64
If output is go version go1.23.x or lower, update needed. If system has no go command, jump to next section for installation.
Installation Options at a Glance
macOS / Linux: Official Installer Recommended
Download page: https://go.dev/dl/
macOS users download .pkg (Apple Silicon) or .tar.gz (Intel) installer, double-click to run. Linux users download .tar.gz, extract to /usr/local or $HOME/go:
# Extract to /usr/local (needs sudo)
sudo tar -C /usr/local -xzf go1.24.4.linux-amd64.tar.gz
# Add to PATH (~/.zshrc or ~/.bashrc)
export PATH=$PATH:/usr/local/go/bin
After installation, open a new terminal window and verify:
go version
# go version go1.24.4 linux/amd64
Windows: MSI Installer Recommended
Download go1.24.4.windows-amd64.msi, double-click to run. Default install location C:\Program Files\Go, installer auto-configures PATH.
Verification: Open PowerShell or CMD, run go version.
Homebrew (macOS Alternative)
macOS users with Homebrew:
brew install go
go version
Homebrew installs Go to /opt/homebrew/opt/go/libexec (Apple Silicon) or /usr/local/go (Intel), PATH auto-configured.
apt / yum (Linux Servers)
Ubuntu / Debian users with apt:
sudo apt update
sudo apt install golang-go
go version
Note: Go version in apt repo may lag behind official. Verify it’s 1.24+. If too old, upgrade:
# Method 1: use goenv
go install golang.org/dl/go1.24.4@latest
go1.24.4 download
# Method 2: manual download tar.gz (above)
Environment Variables: Not Just PATH
After installing Go, two environment variables need attention.
GOPATH: Default Go third-party package install location. Go 1.23+ defaults to $HOME/go, no manual config needed. Verify:
go env GOPATH
# Output: /Users/yourname/go (macOS/Linux)
# or C:\Users\yourname\go (Windows)
GOBIN: Where go install puts compiled executables. Set to a directory in PATH:
# In ~/.zshrc or ~/.bashrc add:
export GOBIN=$HOME/go/bin
After this, each go install somepackage puts the CLI tool directly in PATH.
Multiple Version Coexistence: Using goenv
Teams running multiple Go projects often face Project A using Go 1.22, Project B requiring Go 1.24. goenv manages multiple Go versions.
Install goenv:
brew install goenv # macOS
# Linux: https://github.com/go-nvm/goenv or manual method below
List available versions:
goenv install --list | grep 1.24
# 1.24.4
# 1.24.3
# 1.24.2
Install and switch versions:
goenv install 1.24.4
goenv global 1.24.4 # Global default
# Or in project directory:
goenv local 1.24.4 # Current project only
Place a .go-version file in project root, team members automatically switch to correct version after pulling:
echo "1.24.4" > .go-version
go version
# go version go1.24.4 darwin/arm64
Environment Verification: Four-Step Checklist
Run a minimal verification to confirm Go environment is fully ready:
1. Check version
go version
# Confirm >= 1.24.4
2. Check GOPATH exists
go env GOPATH
ls -d $(go env GOPATH) 2>/dev/null || echo "GOPATH not exist"
3. Check GOBIN in PATH
go env GOBIN
echo $PATH | grep "$(go env GOBIN)" || echo "GOBIN not in PATH"
4. Run a minimal Go program
Create file ~/test-go.go:
package main
import "fmt"
func main() {
fmt.Println("Go environment is ready:", goVersion())
}
func goVersion() string {
return "1.24+"
}
go run ~/test-go.go
# Go environment is ready: 1.24+
If all four steps pass, Go environment is complete.
Common Issues
Q: command not found: go
A: PATH not configured. Confirm install directory in PATH: echo $PATH | tr ':' '\n' | grep go. macOS official installer configures PATH automatically, Homebrew does too.
Q: go version shows 1.23.x, but 1.24 installed
A: Terminal still using old version. Open a new terminal window, or source ~/.zshrc. Multiple Go versions may conflict, use which go to confirm which path is in use.
Q: Downloads too slow in Mainland China
A: Use Go module proxy: export GOPROXY=https://goproxy.cn,direct. Or Qiniu’s proxy: https://goproxy.io.
Next Steps
With environment ready, next article covers ADK Go installation—Google Agent Development Kit’s Go SDK. After installation, run your first Hello World Agent.
← Go ADK Complete Guide | ADK Go Installation & Quick Verification →
Follow “Mengshou Programming” on WeChat for more Go ADK hands-on tutorials, weekly updates on Go / AI programming实战干货.
