Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save souhaiebtar/6c50e3ed666e23cf90ac6079aa48c9df to your computer and use it in GitHub Desktop.
Save souhaiebtar/6c50e3ed666e23cf90ac6079aa48c9df to your computer and use it in GitHub Desktop.
Install Golang 1.17 on Debian / Raspberry Pi #linux

Install Golang 1.17.3 on Debian / Raspberry Pi

rm -rf /usr/local/go

GOVERSION="1.17.6"

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment