Skip to content

Instantly share code, notes, and snippets.

@kimtrien
Forked from nikhita/update-golang.md
Created February 28, 2023 14:24
Show Gist options
  • Save kimtrien/c6c0ca25d23b3b2402c34176e5f512eb to your computer and use it in GitHub Desktop.
Save kimtrien/c6c0ca25d23b3b2402c34176e5f512eb to your computer and use it in GitHub Desktop.

Revisions

  1. @nikhita nikhita revised this gist Jun 6, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion update-golang.md
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    # How to update the Go version

    System: Ubuntu 14.04 (Trusty Tahr)
    System: Debian/Ubuntu/Fedora. Might work for others as well.

    ### 1. Uninstall the exisiting version

  2. @nikhita nikhita revised this gist Jul 27, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion update-golang.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    # How to update Go from 1.7 to 1.8
    # How to update the Go version

    System: Ubuntu 14.04 (Trusty Tahr)

  3. @nikhita nikhita created this gist May 10, 2017.
    31 changes: 31 additions & 0 deletions update-golang.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,31 @@
    # How to update Go from 1.7 to 1.8

    System: Ubuntu 14.04 (Trusty Tahr)

    ### 1. Uninstall the exisiting version

    As mentioned [here](https://golang.org/doc/install#install), to update a go version you will first need to uninstall the original version.

    To uninstall, delete the `/usr/local/go` directory by:

    ```
    $ sudo rm -rf /usr/local/go
    ```

    ### 2. Install the new version

    Go to the [downloads](https://golang.org/dl/) page and download the binary release suitable for your system.

    ### 3. Extract the archive file

    To extract the archive file:

    ```
    $ sudo tar -C /usr/local -xzf /home/nikhita/Downloads/go1.8.1.linux-amd64.tar.gz
    ```

    ### 4. Make sure that your PATH contains `/usr/local/go/bin`

    ```
    $ echo $PATH | grep "/usr/local/go/bin"
    ```