
11

Install Golang on Debian / Raspberry Pi
source link: https://gist.github.com/ookangzheng/8c0c7eba6d7b12d5da6a8bdeec1da9b2
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Install Golang on Debian / Raspberry Pi
rm -rf /usr/local/go
GOVERSION="1.18.4"
wget "https://golang.org/dl/go${GOVERSION}.linux-amd64.tar.gz" -4
tar -C /usr/local -xvf "go${GOVERSION}.linux-amd64.tar.gz"
rm -rf /usr/local/go
GOVERSION="1.17.12"
wget "https://golang.org/dl/go${GOVERSION}.linux-amd64.tar.gz" -4
tar -C /usr/local -xvf "go${GOVERSION}.linux-amd64.tar.gz"
For Bash
cat >> ~/.bashrc << 'EOF'
export GOPATH=$HOME/go
export PATH=/usr/local/go/bin:$PATH:$GOPATH/bin
EOF
source ~/.bashrc
For ZSH
cat >> ~/.zshrc << 'EOF'
export GOPATH=$HOME/go
export PATH=/usr/local/go/bin:$PATH:$GOPATH/bin
EOF
source ~/.zshrc
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK