-
Notifications
You must be signed in to change notification settings - Fork 0
Installing Go
Download and run the installer found at http://golang.org/doc/install
Download an install the darwin binary from https://golang.org/dl/
The apt-get repositories for 14.04 contain golang 1.2.1. Version 1.4.2 is required, so you can download directly (as above); or you can use sudo apt-get install golang 1.4.2
to install. Alternatively, you can add the ethereum apt repository, which hosts golang 1.4.2. Then You will still have to set the $GOPATH and $PATH variables as specified below.
Download the latest distribution
curl -O https://storage.googleapis.com/golang/go1.4.1.linux-amd64.tar.gz
Unpack it to the /usr/local
(might require sudo)
tar -C /usr/local -xzf go1.4.1.linux-amd64.tar.gz
For Go to work properly, you need to set the following two environment variables:
- Setup a go folder
mkdir -p ~/go; echo "export GOPATH=$HOME/go" >> ~/.bashrc
- Update your path
echo "export PATH=$PATH:$HOME/go/bin:/usr/local/go/bin" >> ~/.bashrc
- Read the environment variables into current session:
source ~/.bashrc