How To: Install Go on Raspberry Pi

Go on Raspberry Pi Go running on Raspberry Pi

There’s nothing special about installing Go language on Raspberry Pi platform, apart from the fact that you will get the version of Go compiled for the platform Raspberry Pi is using – which is ARM based.

Install Go using apt-get

Simply install the golang package, expect it to bring quite a few dependencies along:

greys@becky:~ $ sudo apt-get install golang
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
libcgi-fast-perl libcgi-pm-perl libdate-manip-perl libdbi1 libdevel-globaldestruction-perl libdist-checkconflicts-perl libemail-date-format-perl
libexporter-tiny-perl libfcgi-perl libfile-copy-recursive-perl libhtml-parser-perl libhtml-tagset-perl libhtml-template-perl libhttp-date-perl
libhttp-message-perl libio-html-perl libio-multiplex-perl libio-socket-inet6-perl libio-socket-ssl-perl libipc-shareable-perl
liblist-moreutils-perl liblog-dispatch-perl liblog-log4perl-perl liblwp-mediatypes-perl libmailtools-perl libmime-lite-perl libmime-types-perl
libmodule-implementation-perl libmodule-runtime-perl libnet-cidr-perl libnet-libidn-perl libnet-server-perl libnet-smtp-ssl-perl libnet-snmp-perl
libnet-ssleay-perl libparams-classify-perl libparams-validate-perl librrd8 librrds-perl libsocket6-perl libsub-exporter-progressive-perl
libsub-name-perl libtry-tiny-perl lxkeymap munin-doc perl-openssl-defaults python-cairo python-gtk2 python-xklavier rrdtool
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
golang-1.7 golang-1.7-doc golang-1.7-go golang-1.7-src golang-doc golang-go golang-src
Suggested packages:
bzr mercurial
The following NEW packages will be installed:
golang golang-1.7 golang-1.7-doc golang-1.7-go golang-1.7-src golang-doc golang-go golang-src
0 upgraded, 8 newly installed, 0 to remove and 182 not upgraded.
Need to get 27.5 MB of archives.
After this operation, 144 MB of additional disk space will be used.
Do you want to continue? [Y/n] y

Run go to check version

greys@becky:~ $ go version
go version go1.7.4 linux/arm

Have fun!

See Also

Keep Learning

Follow me on Facebook, Twitter or Telegram:
I learn with Educative: Educative
IT Consultancy
I'm a principal consultant with Tech Stack Solutions. I help with cloud architectrure, AWS deployments and automated management of Unix/Linux infrastructure. Get in touch!

Recent Tweets