Go on C.H.I.P.
As per the latest 4.4 build of NTC’s C.H.I.P. OS, based on Debian Jessie, if you issue a plain
apt-get install golang a rather old version of the language will be pulled,
v1.3.3 at the moment of writing.
The Jessie-backports repo is already enabled by default, but its priority correctly stops you from pulling packages from it automatically - even if it contains the newer version that you need.
apt-cache policy golang produces:
Latest version from jessie-backports
Since I couldn’t get APT to recognise the weird
1.6.1+1~bpo8+1 version string, I used a little trick to force it to pull the latest version globally available:
APT will probably complain about other missing packages - especially if you had previously installed an older version of the
golang package and its dependencies - the following extras should stop its complaints:
go env to check that your GOROOT is something along the lines of
Latest version from stretch (testing)
Enable the testing repos to obtain the latest Go version (v1.7 at the moment of writing).
Working with partially enabled unstable repos on the C.H.I.P. is a damn pain. Screw that and barbarically download the official builds from the releases page. See below.
Latest version from the official releases
Download and extract the latest binaries (v1.7.4 at the moment of writing) for the ARM architecture:
Remove any installed version of the
golang package and its dependencies:
And proceed with installing the new version:
Clean up and create your workspace:
All done! Check your installation: