Created
May 17, 2021 10:44
-
-
Save kaustubhkapatral/a48d82c40f9c7752bd406e9ae02754bb to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
sudo apt-get update | |
sudo apt-get -y upgrade | |
sudo apt-get install build-essential jq -y | |
sudo apt install libseccomp-dev | |
sudo apt install pkg-config | |
wget https://golang.org/dl/go1.15.5.linux-amd64.tar.gz | |
sudo tar -xvf go1.15.5.linux-amd64.tar.gz | |
sudo mv go /usr/local | |
mkdir -p go/src/github.com | |
mkdir go/bin | |
export GOROOT=/usr/local/go | |
export GOPATH=$HOME/go | |
export GOBIN=$GOPATH/bin | |
export PATH=$PATH:/usr/local/go/bin:$GOBIN | |
echo "" >> ~/.bashrc | |
echo 'export GOROOT=/usr/local/go' >> ~/.bashrc | |
echo 'export GOPATH=$HOME/go' >> ~/.bashrc | |
echo 'export GOBIN=$GOPATH/bin' >> ~/.bashrc | |
echo 'export PATH=$PATH:/usr/local/go/bin:$GOBIN' >> ~/.bashrc | |
. ~/.bashrc | |
sudo rm -rf go1.15.5.linux-amd64.tar.gz |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment