Last Update: Dec 31, 2022

Check out my YouTube Channel!

If you want to install Go on your Raspberry Pi you have a few options. In the past there was a lot of cross compiling and hacking to get it done, but now you can install it through Apt. However, you’re likely to find an older version.

How to install Go on Raspberry Pi

For instance at the time of this writing, an updated Raspberry Pi OS shows a version of 1.11.1 in the repositories. However the current version is 1.14.3 so if the latest version is important to you, here’s your solution.

Step 1: Get the Latest Package

To get the latest version, browse on over to the Go download page and look for the latest version.

How to install Go on Raspberry Pi

Look for the “ARM v6 version” for the Raspberry Pi.

My current archive is https://dl.google.com/go/go1.14.4.linux-armv6l.tar.gz

Whichever archive you choose, use wget to download it:

mkdir ~/src && cd ~/src
wget https://dl.google.com/go/go1.14.4.linux-armv6l.tar.gz

Now you have the latest package.

Step 2: Extract the Package

Now you’ll want to extract the package into your local folder:

sudo tar -C /usr/local -xzf go1.14.4.linux-armv6l.tar.gz
rm go1.14.4.linux-arm64.tar.gz

Step 3: Configure Go

Now you just need to configure it, which you have to do with any Go installation anyway.

Open up your ~/.profile (Using nano, vi, etc)

vi ~/.profile

and add the following:

PATH=$PATH:/usr/local/go/bin
GOPATH=$HOME/go

Notice here you can set your go path to whatever you like. I prefer /go, but you can put this wherever you want.

Update your shell with your changes:

source ~/.profile

And check your version:

How to install Go on Raspberry Pi

And you’re good to Go!

Get it? Yeah I’ll show myself out.

Enjoy!

Want to become an expert Go programmer?

Learn Go Programming

You can boost your skills in a few weekends by taking these high quality Go courses taught by top experts!

We have over 30 hours of Go courses you can take now! You can try it for 10 days free of charge.


Click here for a free trial!




Published: Jun 2, 2020 by Jeremy Morgan. Contact me before republishing this content.