curl -OL https://golang.org/dl/go1.25.5.linux-amd64.tar.gz
sha256sum go1.25.5.linux-amd64.tar.gz
BashSha256: 9e9b755d63b36acf30c12a9a3fc379243714c1c6d3dd72861da637f336ebb35b
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xvf go1.25.5.linux-amd64.tar.gz && rm -rf go1.25.5.linux-amd64.tar.gzBashnano ~/.profileBashThen, add the following information to the end of this file:
export PATH=$PATH:/usr/local/go/bin:$HOME/go/binBashAnd then reload the profile
source ~/.profileBashAdd go to global path
sudo nano /etc/profileBashexport PATH=$PATH:/usr/local/go/binBashIf you want to clear Go cache
go clean -cacheBashIf you want to force reinstall all globally installed binaries
Make sure you have go-global-update installed
go install github.com/Gelio/go-global-update@latestBash# dry run
go-global-update -nBash# force upgrade all
go-global-update -fBashTo Install on RPi
curl -OL https://golang.org/dl/go1.25.1.linux-arm64.tar.gz
sha256sum go1.25.1.linux-arm64.tar.gz
BashSha256: 65a3e34fb2126f55b34e1edfc709121660e1be2dee6bdf405fc399a63a95a87d
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xvf go1.25.1.linux-arm64.tar.gz
Bash
Leave a Reply