a little place I like to call home.

Bootstrapping Go on Debian

Aug. 27, 2016

9/7/2016 - Updated document to describe updating versions.

Go 1.7 came out about 1 week ago. I've always built my Go via source and here is the process that I use on a fresh system:

First my OS:

cat /etc/*-release
PRETTY_NAME="Debian GNU/Linux 8 (jessie)"
NAME="Debian GNU/Linux"
VERSION="8 (jessie)"

Now to building:

cd $HOME
mkdir go1.4
tar xvzf go1.4.3.linux-amd64.tar.gz -C go1.4 --strip-components=1
rm go1.4.3.linux-amd64.tar.gz
git clone
cd repos/go
git checkout go1.7
cd src
GOROOT_BOOTSTRAP=$HOME/go1.4/ ./all.bash
ln -s $HOME/repos/go/bin/go $HOME/bin/go
go version
=> go version go1.7 linux/amd64

After you've have a go version locally you don't need to keep the go 1.4 version around.

rm -rf $HOME/go1.4

To update it's as simple as fetching new code and building:

cd $HOME/repos/go
git fetch
git checkout go1.7.1
cd src
ln -fs $HOME/repos/go/bin/go $HOME/bin/go
go version
=> go version go1.7.1 linux/amd64

comments powered by Disqus