Last active
October 4, 2021 18:13
-
-
Save felipefbs/9c60fa741942807976d5164299efa0ee to your computer and use it in GitHub Desktop.
Thais script helps to install Go version 1.17.1 in your machine. Remember to run with SUDO.
This file contains hidden or 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
#!/usr/bin/env bash | |
# This script works only with go 1.17.1 version | |
GO_FILE=go1.17.1.linux-amd64.tar.gz | |
wget https://dl.google.com/go/${GO_FILE} | |
sudo tar -C /usr/local -xzf ${GO_FILE} | |
mkdir $HOME/go $HOME/go/src $HOME/go/pkg $HOME/go/bin | |
### Add this to file path in your rc file | |
export PATH="$PATH:/usr/local/go/bin" | |
export GOPATH="$HOME/go" | |
export PATH="$PATH:$GOPATH/bin" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment