-
-
Save glowinthedark/9725645a67ab4d02a5aa3bcfc637cddd to your computer and use it in GitHub Desktop.
Install Go Lang on Raspberry Pi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd /tmp | |
fileName='go1.20.5.linux-armv6l.tar.gz' | |
wget -c https://go.dev/dl/$fileName && sudo rm -rfv /usr/local/go && sudo tar -C /usr/local -xvf $fileName | |
grep -q 'GOPATH=' ~/.bashrc || cat >> ~/.bashrc << 'EOF' | |
export GOPATH=$HOME/go | |
export PATH=/usr/local/go/bin:$PATH:$GOPATH/bin | |
EOF | |
source ~/.bashrc | |
read -p "Press any key to delete downloaded file: $fileName..." | |
rm -rf "$fileName" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment