Skip to content

Instantly share code, notes, and snippets.

@jidckii
Forked from random-robbie/install_go_pi.sh
Last active January 11, 2019 16:45
Show Gist options
  • Save jidckii/92084615a2812e65029c53a461d0be7c to your computer and use it in GitHub Desktop.
Save jidckii/92084615a2812e65029c53a461d0be7c to your computer and use it in GitHub Desktop.
Install Go Lang on Raspberry Pi 3
#!/bin/sh
# For install
# curl -sSL raw_url | sh
GO_VERSION_DEFAULT=1.11.4
if [ -z "$GO_VERSION" ]; then
GO_VERSION=$GO_VERSION_DEFAULT
fi
wget https://dl.google.com/go/go${GO_VERSION}.linux-armv6l.tar.gz
sudo tar -C /usr/local -xzvf go${GO_VERSION}.linux-armv6l.tar.gz
cat >> ~/.bashrc << 'EOF'
# GOLANG
export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export PATH=$PATH:$GOPATH/bin:$GOROOT/bin
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment