Ian Lance Taylor | cd1ce5c | 2017-10-24 09:38:49 -0700 | [diff] [blame] | 1 | The Go project's official download page is at [https://golang.org/dl/](https://golang.org/dl/). |
| 2 | |
| 3 | There 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 Fitzpatrick | 9259a69 | 2017-03-22 10:08:48 -0700 | [diff] [blame] | 5 | Try: |
Albert Wang | cfdc57f | 2016-03-12 16:33:05 -0800 | [diff] [blame] | 6 | |
| 7 | ``` |
Fazle Arefin | d7622c1 | 2017-03-24 02:26:22 +1100 | [diff] [blame] | 8 | $ sudo apt-get install golang-go |
Albert Wang | cfdc57f | 2016-03-12 16:33:05 -0800 | [diff] [blame] | 9 | ``` |
| 10 | |
Ian Lance Taylor | cd1ce5c | 2017-10-24 09:38:49 -0700 | [diff] [blame] | 11 | If that's too old for you, try: |
世外桃源 | 4f600cd | 2016-10-14 09:51:09 +0800 | [diff] [blame] | 12 | |
Thiago Avelino | 00e9b66 | 2017-03-13 21:40:39 -0300 | [diff] [blame] | 13 | ``` |
cdetrio | 151aa82 | 2017-09-17 14:08:16 -0400 | [diff] [blame] | 14 | $ sudo add-apt-repository ppa:gophers/archive |
iivanov | 2f832bd | 2018-01-19 19:16:09 +0200 | [diff] [blame] | 15 | $ sudo apt-get update |
Joshua Wickings | 281ae31 | 2018-03-21 01:37:31 -0400 | [diff] [blame] | 16 | $ sudo apt-get install golang-1.10-go |
Brad Fitzpatrick | 9259a69 | 2017-03-22 10:08:48 -0700 | [diff] [blame] | 17 | ``` |
| 18 | |
Joshua Wickings | 281ae31 | 2018-03-21 01:37:31 -0400 | [diff] [blame] | 19 | > **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 Landry | 43f8a8a | 2017-09-06 16:25:31 -0400 | [diff] [blame] | 20 | |
Chris Glass | bcab270 | 2017-06-08 01:04:25 +0200 | [diff] [blame] | 21 | Using snaps also works quite well: |
| 22 | |
| 23 | ``` |
googlebleh | 07bcacd | 2017-10-03 23:48:29 -0400 | [diff] [blame] | 24 | # This will give you the latest version of go |
T. Mulyana | f70a8a5 | 2018-07-28 21:58:25 +0700 | [diff] [blame] | 25 | $ sudo snap install --classic go |
Chris Glass | bcab270 | 2017-06-08 01:04:25 +0200 | [diff] [blame] | 26 | ``` |
Ian Lance Taylor | cd1ce5c | 2017-10-24 09:38:49 -0700 | [diff] [blame] | 27 | > A restart is required for the command to be recognized. |
Brad Fitzpatrick | 9259a69 | 2017-03-22 10:08:48 -0700 | [diff] [blame] | 28 | |
Simon Eisenmann | 10b0b97 | 2018-10-27 17:42:46 +0200 | [diff] [blame] | 29 | If 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 Fitzpatrick | 9259a69 | 2017-03-22 10:08:48 -0700 | [diff] [blame] | 30 | |
RPiAwesomeness | 66ed20d | 2017-03-26 09:58:13 -0400 | [diff] [blame] | 31 | ``` |
| 32 | sudo add-apt-repository ppa:longsleep/golang-backports |
| 33 | sudo apt-get update |
| 34 | sudo apt-get install golang-go |
Simon Eisenmann | 63ba1d2 | 2018-10-27 17:45:18 +0200 | [diff] [blame] | 35 | ``` |
| 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.** |