Last Update: Jun 7, 2024

Coding with AI

I wrote a book! Check out A Quick Guide to Coding with AI.
Become a super programmer!
Learn how to use Generative AI coding tools as a force multiplier for your career.


The Pinebook Pro has been one of my best tech purchases in years. It’s so handy. It’s lightweight, has great battery life, and is just fun to use. It’s not the fastest laptop I own, but it’s certainly fast enough for Go development, among other things. I often write Go and Python programs on it when I’m in the mood to goof around and try new stuff.

Here’s how you can install Go on the Pinebook Pro, with the Manjaro image. There are two ways.

Step 1: Update the System

Golang on Manjaro

Before you do anything you’ll want to make sure your system is up to date. At your Manjaro desktop, open a command prompt.

Then update the system:

sudo pacman -Syu

This will make sure your system is up to date.

Installing Go the Easy Way

Here’s how you can install Go the easy way: through the package manager.

Pros

  • The Package manager will handle versioning and setup

Cons

  • You may not get the latest and greatest version.

Here’s what you do.

Type in

sudo pacman -S go

you can verify it’s installed by typing in:

go version

How to install Go on Pinebook Pro

So now I’m going to create a projects folder (/home/jeremy/Projects) and create a hello world to test this out.

Create a file named hello.go and put in the hello world code:

package main
import "fmt"
func main() {
    fmt.Println("hello world")
}

Save the file, and then build it with the following command:

go build hello.go

This will build an executable you can run named “hello”

if you run it, it should output your message: How to install Go on Pinebook Pro

Party time - excellent. You’re ready to Go.

Installing Go the Hard Way

Pros

  • You get the latest version of Go

Cons

  • This is not managed by Pacman, so you need to upgrade manually.


The hard way isn’t that hard. We’re pulling down the binary directly from the Go download page and installing it manually to get the latest and greatest version.

Load up the page and look for the ARMv8 version. Right-click on it and copy link address.

How to install Go on Pinebook Pro

Create a directory named SRC

mkdir ~/src && cd ~/src

Use wget to download the archive. In my case it’s

wget https://golang.org/dl/go1.16.6.linux-arm64.tar.gz

The version number may be different when you do this install.

Next, we’ll extract this to ‘/usr/local/go’

sudo tar -C /usr/local -xzf go1.16.6.linux-arm64.tar.gz

After that installs, we’ll need to open ‘~/.bashrc’ and add the following:

export GOROOT=/usr/local/go/bin
export GOPATH=/home/jeremy/go
export PATH=$PATH:$GOROOT:$GOPATH

For the $GOPATH use your home directory. You can put it anywhere you want, and it doesn’t matter much as the GOPATH method is starting to fall out of favor. But you will need to set up $GOROOT as shown.

Now, refresh the file:

source ~/.bashrc

Then type in

go version

How to install Go on Pinebook Pro

Party time - excellent. You’re ready to Go.

Final Thoughts

I love my Pinebook and I love Go, so I spend a lot of time coding Go and building applications on it. It’s a great experience. The lean resource usage of Go and fast compile times means it doesn’t take much power to build things. I wanted to share how I set things up.

If you have any questions or comments, feel free to Yell at me.

Also, I do a lot of live streaming with Go so follow me on Twitch and join me!


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!



Stay up to date on the latest in Computer Vision and AI.

Get notified when I post new articles!

Intuit Mailchimp




Published: Jul 26, 2021 by Jeremy Morgan. Contact me before republishing this content.