Difference between revisions of "Go install"
Jump to navigation
Jump to search
m (Busk moved page Golang install to Go install without leaving a redirect ) |
|||
Line 4: | Line 4: | ||
#!/bin/bash | #!/bin/bash | ||
set -eu | set -eu | ||
− | version=1. | + | version=1.22.1 |
sudo apt remove -y golang-go || true | sudo apt remove -y golang-go || true | ||
# curl -LO https://go.dev/dl/go1.20.3.linux-amd64.tar.gz | # curl -LO https://go.dev/dl/go1.20.3.linux-amd64.tar.gz |
Latest revision as of 14:49, 23 March 2024
https://golang.org/doc/install
#!/bin/bash set -eu version=1.22.1 sudo apt remove -y golang-go || true # curl -LO https://go.dev/dl/go1.20.3.linux-amd64.tar.gz curl -LO https://golang.org/dl/go$version.linux-amd64.tar.gz sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go$version.linux-amd64.tar.gz echo 'export PATH=${PATH}:/usr/local/go/bin' >> ~/.bashrc . ~/.bashrc
Snap
sudo snap install --classic go
Apt
sudo apt install -y golang-go