Install latest Go 1.13.1 on Fedora 30

abitrolly profile image Anatoli Babenia ・2 min read

Go 1.13 was released just a few weeks ago and I already need it for a better error control.

I am test driving vim-go for landing some changes to tflint. Awesome vim-go can easily install all necessary tools for Go development with simple :GoInstallBinaries command, except for the go itself.

Fedora 30 that I use comes with Go 1.12 and I didn't switch to beta 31 yet. The official instructions from golang website tell to just download and unpack tarball, set some environment variables in profile, and that seemed too burdensome. I will have to repeat that every time when I need some security updates and bugfixes. I also don't want to think about possible version conflicts when I finally switch to Fedora 31.

Instead I found out that I can install Go from snapcraft, which is official project by Canonical. Thanks to generous people out there, snaps are available for Fedora, and you can choose the Go version you need.

# install `snapd`, which is necessary to run snaps
sudo dnf install snapd
# classic snaps like `go` require some symlinking
sudo ln -s /var/lib/snapd/snap /snap
# `go` snap from will be updated automatically
sudo snap install go --channel 1.13/stable --classic

sudo snap info go reveals channels with all available versions.

$ sudo snap info go | grep stable
tracking:     1.13/stable
  stable:         1.12.10       2019-09-25 (4520) 92MB classic
  1.13/stable:    1.13.1        2019-09-25 (4517) 92MB classic
  1.12/stable:    1.12.10       2019-09-25 (4520) 92MB classic
  1.11/stable:    1.11.13       2019-08-15 (4286) 82MB classic
  1.10/stable:    1.10.8        2019-01-24 (3133) 58MB classic
  1.9/stable:     1.9.7         2018-06-13 (2117) 58MB classic
  1.8/stable:     1.8.7         2018-02-07 (1407) 51MB classic
  1.7/stable:     1.7.6         2017-06-02  (324) 48MB classic
  1.6/stable:     1.6.4         2017-05-17  (122) 49MB classic


Editor guide