Wikipedia para siempre
TreeWeb::Artículos::Golang::Installing Golang in linux
Permalink: http://www.treeweb.es/u/1305/ 15/01/2016

Installing Golang in linux

There are several ways to install golang in your linux system, but the best one is this guide

#1 Download preferred go version

Go to https://golang.org/dl/ and download your preferred version, for example:
    0 
    1 wget https://storage.googleapis.com/golang/go1.5.3.linux-amd64.tar.gz

    2 
Or the curl command:
    0 
    1 curl -O https://storage.googleapis.com/golang/go1.5.3.linux-amd64.tar.gz

    2 

#2 Unzip the file

For example, we will unzip this in your home folder:
    0 
    1 tar -xzf go1.5.3.linux-amd64.tar.gz -C $HOME

    2 

#3 Add go binary to the PATH

Edit your ~/.profile and append following lines:
    0 
    1 PATH=$HOME/go/bin:$PATH
    2 export GOROOT=$HOME/go
    3 

    4 
Reset your terminal session so the changes can take effects:
    0 
    1 . ./.profile

    2 

#4 Check all works fine

Ask go command for the current version:
    0 
    1 go version

    2 
This is the expected output:
    0 
    1 go version go1.5.3 linux/amd64

    2 
Powered by TreeWeb
© TreeWeb 2010. Todos los derechos reservados