blob: 46d052de388772de0754ae9350f838346bc06b64 [file] [log] [blame] [view]
Ian Lance Taylorcd1ce5c2017-10-24 09:38:49 -07001The Go project's official download page is at [https://golang.org/dl/](https://golang.org/dl/).
2
3There are some other options for Debian based systems like Ubuntu. These packages were not created by the Go project, and we don't support them, but they may be useful for you.
4
Brad Fitzpatrick9259a692017-03-22 10:08:48 -07005Try:
Albert Wangcfdc57f2016-03-12 16:33:05 -08006
7```
Fazle Arefind7622c12017-03-24 02:26:22 +11008$ sudo apt-get install golang-go
Albert Wangcfdc57f2016-03-12 16:33:05 -08009```
10
Ian Lance Taylorcd1ce5c2017-10-24 09:38:49 -070011If that's too old for you, try:
世外桃源4f600cd2016-10-14 09:51:09 +080012
Thiago Avelino00e9b662017-03-13 21:40:39 -030013```
cdetrio151aa822017-09-17 14:08:16 -040014$ sudo add-apt-repository ppa:gophers/archive
iivanov2f832bd2018-01-19 19:16:09 +020015$ sudo apt-get update
Joshua Wickings281ae312018-03-21 01:37:31 -040016$ sudo apt-get install golang-1.10-go
Brad Fitzpatrick9259a692017-03-22 10:08:48 -070017```
18
Joshua Wickings281ae312018-03-21 01:37:31 -040019> **Note that golang-1.10-go puts binaries in /usr/lib/go-1.10/bin. If you want them on your PATH, you need to make that change yourself.**
David Landry43f8a8a2017-09-06 16:25:31 -040020
Chris Glassbcab2702017-06-08 01:04:25 +020021Using snaps also works quite well:
22
23```
googlebleh07bcacd2017-10-03 23:48:29 -040024# This will give you the latest version of go
T. Mulyanaf70a8a52018-07-28 21:58:25 +070025$ sudo snap install --classic go
Chris Glassbcab2702017-06-08 01:04:25 +020026```
Ian Lance Taylorcd1ce5c2017-10-24 09:38:49 -070027> A restart is required for the command to be recognized.
Brad Fitzpatrick9259a692017-03-22 10:08:48 -070028
Simon Eisenmann10b0b972018-10-27 17:42:46 +020029If you're using Ubuntu 16.04 LTS, 18.04 LTS or 18.10, then you can use the `longsleep/golang-backports` PPA and install Go 1.11.
Brad Fitzpatrick9259a692017-03-22 10:08:48 -070030
RPiAwesomeness66ed20d2017-03-26 09:58:13 -040031```
32sudo add-apt-repository ppa:longsleep/golang-backports
33sudo apt-get update
34sudo apt-get install golang-go
Simon Eisenmann63ba1d22018-10-27 17:45:18 +020035```
36
37> **Note that golang-go installs latest Go as default Go. If you do not want that, install `golang-1.11` instead and use the binaries from /usr/lib/go-1.11/bin.**