7

I'm new to Linux / Yum and just set up an AWS AMI instance. I'm trying to install Go 1.8. When I ran sudo yum install golang it installed version 1.6.3. How can I make it install version 1.8?

[ec2-user@ip-123 ~]$ yum --showduplicates list golang | expand
Loaded plugins: priorities, update-motd, upgrade-helper
Available Packages
golang.x86_64                   1.5.3-1.22.amzn1                    amzn-main   
golang.x86_64                   1.6.3-2.57.amzn1                    amzn-updates
migu
  • 183
  • 1
  • 1
  • 6
  • 1
    https://rpmfind.net/linux/rpm2html/search.php?query=golang indicates that the only repo with that version of golang is Rawhide. https://fedoraproject.org/wiki/Releases/Rawhide gives background on Rawhide. You may be able to selectively copy rpm's from there and create your own repo that works on centos. – chicks Mar 19 '17 at 13:24

3 Answers3

5

Unless someone either adds Go 1.8 to a repo or builds a specific repo for it, you need to manually install it.

Sven
  • 98,649
  • 14
  • 180
  • 226
  • Thanks. So the latest version that was added to the repo was 1.6.3? – migu Mar 18 '17 at 18:40
  • 2
    Yes, exactly. Amazon Linux is based on RHEL, and in such environments, you rarely find this kind of new releases, instead everything is kept at a known state plus security fixes to ensure a stable environment. – Sven Mar 18 '17 at 18:42
  • 2
    Amazon Linux was _forked_ from CentOS 5...almost a decade ago. It doesn't bear that much resemblance anymore. – Michael Hampton Mar 18 '17 at 22:43
0

For installing latest go versions, you would need to add a repository with the latest versions.

sudo rpm --import https://mirror.go-repo.io/centos/RPM-GPG-KEY-GO-REPO
curl -s https://mirror.go-repo.io/centos/go-repo.repo | sudo tee /etc/yum.repos.d/go-repo.repo
sudo yum install golang
subtleseeker
  • 171
  • 1
  • 4
0

I did not find any YUM repository that had dedicated packages in the version Go 1.8

Options that you would have in this case and that work, are compile via source code, as in these Howtos:

https://tecadmin.net/install-go-lang-on-centos/ https://tecadmin.net/install-go-on-centos/

Hope this helps.

@firebitsbr

firebitsbr
  • 101
  • 1