Last Updated: 2025-01-28
This document provides instructions for manually upgrading Go to version 1.25+ to run Eos tests and build the project.
Several Eos dependencies require Go 1.25 or later:
github.com/hashicorp/consul/api@v1.33.0- requires Go 1.25.3github.com/go-json-experiment/json@v0.0.0-20251027170946-4849db3c2f7e- requires Go 1.25- Other transitive dependencies
Current System: Go 1.24.7 Required: Go 1.25.0 or later
Download from official Go website (if direct download is available):
# Download Go 1.25.0 for Linux (replace with your platform)
wget https://go.dev/dl/go1.25.0.linux-amd64.tar.gz -O /tmp/go1.25.0.linux-amd64.tar.gz
# Or use curl
curl -L https://go.dev/dl/go1.25.0.linux-amd64.tar.gz -o /tmp/go1.25.0.linux-amd64.tar.gzAlternative Download Locations (if primary is blocked):
- Go mirrors: https://golang.google.cn/dl/ (China mirror)
- GitHub releases: https://github.com/golang/go/releases
# Download checksum
wget https://go.dev/dl/go1.25.0.linux-amd64.tar.gz.sha256 -O /tmp/go1.25.0.sha256
# Verify checksum
cd /tmp
sha256sum -c go1.25.0.sha256
# Should output: go1.25.0.linux-amd64.tar.gz: OK# Remove old Go installation (if you want to replace)
sudo rm -rf /usr/local/go
# Extract new Go version
sudo tar -C /usr/local -xzf /tmp/go1.25.0.linux-amd64.tar.gz
# Verify installation
/usr/local/go/bin/go version
# Should output: go version go1.25.0 linux/amd64# Add to ~/.bashrc or ~/.zshrc
export PATH=/usr/local/go/bin:$PATH
# Reload shell configuration
source ~/.bashrc
# Verify go is in PATH
which go
go versionIf you have gvm (Go Version Manager) installed:
# Install Go 1.25.0
gvm install go1.25.0
# Use Go 1.25.0
gvm use go1.25.0 --default
# Verify
go versionIf you have asdf installed:
# Add Go plugin
asdf plugin add golang
# Install Go 1.25.0
asdf install golang 1.25.0
# Set global version
asdf global golang 1.25.0
# Verify
go versionIf official Go website is blocked, try these alternatives:
# Set HTTP proxy (if available)
export http_proxy=http://your-proxy:port
export https_proxy=http://your-proxy:port
# Then download as normal
wget https://go.dev/dl/go1.25.0.linux-amd64.tar.gz# Clone Go source
git clone https://github.com/golang/go.git /tmp/go-source
cd /tmp/go-source
git checkout go1.25.0
# Build from source (requires Go 1.20+ already installed)
cd src
./all.bash
# Install
sudo cp -r /tmp/go-source /usr/local/go-1.25.0
sudo ln -sf /usr/local/go-1.25.0 /usr/local/gosudo add-apt-repository ppa:longsleep/golang-backports
sudo apt update
sudo apt install golang-1.25
# Update alternatives
sudo update-alternatives --install /usr/bin/go go /usr/lib/go-1.25/bin/go 1brew install go@1.25# May not have Go 1.25 yet, check availability
sudo dnf install golangAfter installation, verify everything works:
# Check Go version
go version
# Should show: go version go1.25.0 (or later) linux/amd64
# Check Eos can build
cd /home/user/eos
go build -o /tmp/eos-build ./cmd/
# Run tests
go test -v ./pkg/vault
# Run integration tests (if Vault cluster available)
export VAULT_ADDR="https://localhost:8200"
export VAULT_TOKEN_TEST="your_test_token"
export EOS_TEST_ENVIRONMENT="true"
go test -v -tags=integration ./pkg/vaultProblem: Go is trying to auto-download toolchain but network is blocked
Solution:
# Disable automatic toolchain download
export GOTOOLCHAIN=local
# Or set in go.env
go env -w GOTOOLCHAIN=local
# Then use your manually installed Go
go versionProblem: Need sudo/root privileges
Solution:
# Install to user directory instead
mkdir -p ~/go-1.25.0
tar -C ~/go-1.25.0 --strip-components=1 -xzf go1.25.0.linux-amd64.tar.gz
# Update PATH
export PATH=~/go-1.25.0/bin:$PATH
# Make permanent
echo 'export PATH=~/go-1.25.0/bin:$PATH' >> ~/.bashrcProblem: System has multiple Go installations
Solution:
# Find all Go installations
which -a go
# Use specific version
/usr/local/go/bin/go version
# Or update PATH to prefer new version
export PATH=/usr/local/go/bin:$PATHProblem: Old go.sum or module cache
Solution:
# Clean module cache
go clean -modcache
# Remove go.sum and regenerate
rm go.sum
go mod tidy
# Verify modules
go mod verifyIf you're in a highly restricted network environment:
-
On machine with internet access:
wget https://go.dev/dl/go1.25.0.linux-amd64.tar.gz
-
Transfer file to restricted machine:
# Via USB drive, SCP, or internal file sharing scp go1.25.0.linux-amd64.tar.gz user@restricted-machine:/tmp/ -
Install on restricted machine:
sudo tar -C /usr/local -xzf /tmp/go1.25.0.linux-amd64.tar.gz
If your organization has an internal mirror:
# Download from internal mirror
wget http://internal-mirror/go/go1.25.0.linux-amd64.tar.gz
# Or configure Go proxy
go env -w GOPROXY=http://internal-goproxy:8080# On machine with internet, vendor dependencies
go mod vendor
# Commit vendor/ directory
git add vendor/
git commit -m "vendor: add dependencies for Go 1.25"
# On restricted machine, use vendored deps
go build -mod=vendorEnvironment: Go 1.24.7 installed Required: Go 1.25.0+ Blocking: Network restrictions prevent automatic download
Recommendation: Follow Option 1 (Manual Installation) or Method 1 (Download on Different Machine) for network-restricted environments.
Once Go 1.25+ is installed:
# Navigate to Eos directory
cd /home/user/eos
# Update dependencies
go mod tidy
# Build project
go build -o /tmp/eos-build ./cmd/
# Run tests
go test -v ./pkg/...
# Run integration tests
export VAULT_ADDR="https://localhost:8200"
export VAULT_TOKEN_TEST="your_token"
export EOS_TEST_ENVIRONMENT="true"
go test -v -tags=integration ./pkg/vault- Official Go Downloads: https://go.dev/dl/
- Go Installation Guide: https://go.dev/doc/install
- Go Release Notes: https://go.dev/doc/devel/release
- Eos Testing Guide: TESTING.md
If you encounter issues not covered here:
- Check Go installation:
go version - Check environment:
go env - Check module status:
go mod verify - Check network:
curl -I https://go.dev - See TESTING.md for test-specific issues
Code Monkey Cybersecurity - "Cybersecurity. With humans."