Skip to content

Instantly share code, notes, and snippets.

@shooley
shooley / gist:24e869265738e3fa98656eae1b7a9669
Created October 13, 2018 17:10 — forked from zenhob/gist:f70bbb802e3e6729a1a6
Bulding Go binaries for Raspberry Pi

To build a binary that will run on the Raspberry Pi, you need to have a Go cross compiler and enable it when building the executable.

To build the cross compiler for Linux/ARM (you only need to do this once):

cd /usr/local/go/src
sudo GOOS=linux GOARCH=arm ./make.bash --no-clean

Once you've done that, you can build a binary for Raspberry Pi: