Skip to content

Instantly share code, notes, and snippets.

@Adron
Last active March 27, 2024 22:10
Show Gist options
  • Star 16 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save Adron/4e1e7d0f71da7c415f455d5930ea94c9 to your computer and use it in GitHub Desktop.
Save Adron/4e1e7d0f71da7c415f455d5930ea94c9 to your computer and use it in GitHub Desktop.
Installing golang via apt-get
sudo add-apt-repository ppa:ubuntu-lxc/lxd-stable
sudo apt-get update
sudo apt-get -y upgrade
sudo apt-get install golang
# Usually this is good to install golang, but alas the apt-get repo is usually out of sync with the latest.
@kenk667
Copy link

kenk667 commented Feb 9, 2018

latest is sudo add-apt-repository ppa:ubuntu-lxc/stable

@imfht
Copy link

imfht commented May 21, 2018

@d78ui98
Copy link

d78ui98 commented Sep 13, 2018

Are these method necessary now?
why can't I cant just update and do

sudo apt install golang-go

With this I get the lastest version 1.6.2

@Syakyr
Copy link

Syakyr commented Oct 8, 2018

Latest version is 1.10, not 1.6.2.

@ocidenttal
Copy link

Latest version is 1.16 now boys, read the official wiki, there's a installation guide

@nigurr
Copy link

nigurr commented Aug 24, 2021

This is better option in my view: https://github.com/stefanmaric/g

@noraj
Copy link

noraj commented Oct 3, 2021

This is better option in my view: https://github.com/stefanmaric/g

In my opinion this is better, https://asdf-vm.com with https://github.com/kennyp/asdf-golang

@Adron
Copy link
Author

Adron commented Nov 2, 2021

I concur @noraj and @nigurr, and all others, there are newer version and better ways to get Go installed based on what you're doing.

This gist is here for reference to a past blog entry and links. YMMV on use or if this even works anymore.

@zoltan-kecskemethy-epam

Yes. Agree. Keep it. Good source of info! Thanks.

@g1gabyteDEV
Copy link

g1gabyteDEV commented Sep 21, 2023

Cant you just use this:
sudo apt install nala
sudo nala install golang

@Adron
Copy link
Author

Adron commented Dec 8, 2023

This OP I wrote is pretty dated at this point @g1gabyteDEV. So YMMV and I don't even do it this way anymore. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment