ubuntu install golang 1.5.1 - ppa or?

1,211 views
Skip to first unread message

Jason E. Aten

unread,
Oct 27, 2015, 3:34:59 PM10/27/15
to golang-nuts
I'd like guidance on how to setup a Ubuntu machine that provides go1.5.1.  e.g. when setting up a build-bot. 

Is there a PPA for ubuntu 14 (and later) that has an up to date golang 1.5.1 binary install available?  

I tried "add-apt-repository ppa:eugenesan/ppa && apt-get update"  but that gave me the already-out-of-date go1.5, not 1.5.1.

root@ub14:/usr/local/bin# apt-cache policy golang

golang:

  Installed: (none)

  Candidate: 2:1.5-1~eugenesan~trusty1

  Version table:

     2:1.5-1~eugenesan~trusty1 0

        500 http://ppa.launchpad.net/eugenesan/ppa/ubuntu/ trusty/main amd64 Packages

     2:1.2.1-2ubuntu1 0

        500 http://mirrors.digitalocean.com/ubuntu/ trusty/universe amd64 Packages

root@ub14:/usr/local/bin#


# go version

go version go1.5 linux/amd64


Shawn Milochik

unread,
Oct 27, 2015, 3:56:50 PM10/27/15
to golan...@googlegroups.com
No, just download it from here:

Then (from here: https://golang.org/doc/install) just;

sudo tar -C /usr/local -xzf go$VERSION.$OS-$ARCH.tar.gz


This way you get the current version.

Tamás Gulácsi

unread,
Oct 28, 2015, 1:31:07 AM10/28/15
to golang-nuts
Or use godeb from github.com/niemeyer/godeb

Alexander Frimmel

unread,
Oct 28, 2015, 10:22:32 AM10/28/15
to golang-nuts
Some time ago I put that into a script for ubuntu/opensuse desktops.

GOLANG_VERSION=1.5.1
GOLANG_SRC
=https://storage.googleapis.com/golang/go$GOLANG_VERSION.linux-amd64.tar.gz
cd
wget
-c $GOLANG_SRC
tar
-xvf go$GOLANG_VERSION.linux-amd64.tar.gz
mv go go$GOLANG_VERSION
mkdir
-p $HOME/projects/go/{bin,pkg,src}
ln
-s go$GOLANG_VERSION go
echo
export PATH="$PATH:$HOME/go/bin" >> ~/.profile
echo export GOROOT=$HOME/
go/ >> ~/.profile
echo export GOPATH=$HOME/
projects/go >> ~/.profile
echo export GOBIN=$HOME/
projects/go/bin >> ~/.profile

Thats all you need todo.
Reply all
Reply to author
Forward
0 new messages