sudo apt-get update
Установить язык Go. sudo apt-get install golang
Установите GOPATH в домашнюю папку. После этого действия вы можете использовать команду echo $GOPATH, чтобы проверить местоположение пути go. export GOPATH=$HOME/gopath
Для GOPATH определить его не обязательно. Но вы все еще можете определить это. # Get the go installation root path.
go env GOROOT
# Set the result of `go env GOROOT` to system variable GOROOT.
# In this example, the result of `go env GOROOT` is `/usr/lib/go-1.6`
export GOROOT=/usr/lib/go-1.6
sudo apt-get update
Обновить.
a. GOPATH находится в /home/casper/gopath. б. GOROOT находится в /usr/lib/go-1.6.