Is there an easy way to update the version of golang installed?

11,229 views
Skip to first unread message

j...@j4r.org

unread,
Oct 29, 2013, 9:01:05 PM10/29/13
to golan...@googlegroups.com
I was just wondering if there is an easy way to update golang, without just reinstalling it (ie. go update).

Matt Silverlock

unread,
Oct 29, 2013, 11:56:15 PM10/29/13
to golan...@googlegroups.com

https://github.com/moovweb/gvm may be useful. Otherwise, Homebrew if you're using OS X.

Other than that, an uninstall -> reinstall isn't really a big problem with Go. You don't need to reinstall your packages, and it's rare for any package to have issues between versions of Go due to the Go 1 guarantee (backwards compat/stable API).

PS: Most languages don't provide a way to upgrade their runtime/VM/etc with a one-liner. It's generally left for package managers to handle (because why reinvent the wheel?)

minux

unread,
Oct 30, 2013, 1:34:51 AM10/30/13
to j...@j4r.org, golang-nuts
On Tue, Oct 29, 2013 at 9:01 PM, <j...@j4r.org> wrote:
I was just wondering if there is an easy way to update golang, without just reinstalling it (ie. go update).
The answer depends on how you installed Go on your system.

But the general advice is that, if you care about updating Go, and don't want to wait for your package manager
to update, you should checkout the Go source code repository and build it in the repository.

I think most of the Go authors do this, and Go has excellent support for this form of installation (actually, because
Go installs everything under $GOROOT (/bin, /pkg), the Go repository clone is farily self-contained, you don't
even need to use root to "install" Go in this case. 

Mandolyte

unread,
Oct 30, 2013, 10:00:23 PM10/30/13
to golan...@googlegroups.com, j...@j4r.org
If you can use deb packages, consider godeb by Gustavo Niemeyer. documentation at:

dsav...@gmail.com

unread,
Oct 31, 2013, 9:00:30 AM10/31/13
to golan...@googlegroups.com, j...@j4r.org
there are no pre-built packages for RedHat, are there?

Jacek Furmankiewicz

unread,
Oct 31, 2013, 4:36:49 PM10/31/13
to golan...@googlegroups.com, j...@j4r.org, dsav...@gmail.com
Fedora is very up to date,

after doing

yum install golang

any subsequent

yum update

will keep you up to date fairly quickly.


Reply all
Reply to author
Forward
0 new messages