Go/gvm: Difference between revisions

From Fundamental Ramen
< Go
Jump to navigation Jump to search
No edit summary
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
= Usage =
{| class="wikitable"
! TODO
! Command
|-
| List available versions || <syntaxhighlight lang="bash">gvm listall</syntaxhighlight>
|}
= Install gvm on Ubuntu 24 =
https://github.com/moovweb/gvm
https://github.com/moovweb/gvm


Line 15: Line 26:
gvm install go1.4 -B
gvm install go1.4 -B
gvm use go1.4
gvm use go1.4
export GOROOT_BOOTSTRAP=$GOROOT
# export GOROOT_BOOTSTRAP=$GOROOT


# install go 1.17 as build tool-chain for go1.20
# install go 1.17 as build tool-chain for go1.20
gvm install go1.17.13
gvm install go1.17.13
gvm use go1.17.13
gvm use go1.17.13
export GOROOT_BOOTSTRAP=$GOROOT
# export GOROOT_BOOTSTRAP=$GOROOT


# install go 1.20 as build tool-chain for go1.23
# install go 1.20 as build tool-chain for go1.23
gvm install go1.20.14
gvm install go1.20.14
gvm use go1.20.14
gvm use go1.20.14
export GOROOT_BOOTSTRAP=$GOROOT
# export GOROOT_BOOTSTRAP=$GOROOT
 
# install go
gvm install 1.23.9
</syntaxhighlight>
 
= Install gvm on Ubuntu 24 =
 
<syntaxhighlight lang="bash">
# Clean up
rm -rf ~/.gvm
 
# Install dependencies including mercurial (often missing)
sudo apt install -y curl git mercurial make binutils bison gcc build-essential bsdmainutils


# Install GVM
# install go 1.23
bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer)
gvm install 1.23.12
source ~/.gvm/scripts/gvm
gvm use go1.23.12
 
# Install binary bootstrap Go 1.4
gvm install go1.4 -B
gvm use go1.4 --default
 
# Now install newer version
gvm install go1.17.13
gvm use go1.17.13


# Then install latest
# install go 1.24
gvm install go1.23.3
# The final selected version must have --default parameter,
gvm use go1.23.3 --default
# otherwise the selected version would become go1.4 after logout.
gvm install 1.24.10
gvm use go1.24.10 --default
</syntaxhighlight>
</syntaxhighlight>

Latest revision as of 07:55, 17 November 2025

Usage

TODO Command
List available versions
gvm listall

Install gvm on Ubuntu 24

https://github.com/moovweb/gvm

# Clean up
rm -rf ~/.gvm

# Install dependencies including mercurial (often missing)
sudo apt install -y curl git mercurial make binutils bison gcc build-essential bsdmainutils

# Install GVM
bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer)
source ~/.gvm/scripts/gvm

# install go1.4 first as build tool-chain for go1.17
gvm install go1.4 -B
gvm use go1.4
# export GOROOT_BOOTSTRAP=$GOROOT

# install go 1.17 as build tool-chain for go1.20
gvm install go1.17.13
gvm use go1.17.13
# export GOROOT_BOOTSTRAP=$GOROOT

# install go 1.20 as build tool-chain for go1.23
gvm install go1.20.14
gvm use go1.20.14
# export GOROOT_BOOTSTRAP=$GOROOT

# install go 1.23
gvm install 1.23.12
gvm use go1.23.12

# install go 1.24
# The final selected version must have --default parameter,
# otherwise the selected version would become go1.4 after logout. 
gvm install 1.24.10
gvm use go1.24.10 --default