How to install the current version of Go in Ubuntu Precise

前端 未结 17 1948
温柔的废话
温柔的废话 2021-01-29 19:08

Running sudo apt-get install golang-stable, I get Go version go1.0.3. Is there any way to install go1.1.1?

17条回答
  •  故里飘歌
    2021-01-29 19:40

    [October 2015] Answer because the current accepted answersudo apt-get install golang isn't uptodate and if you don't want to install GVM follow these steps.

    Step by step installation:

    1. Download the latest version here (OS: Linux).
    2. Open your terminal and go to your Downloads directory
    3. sudo tar -C /usr/local -xzf go$VERSION.$OS-$ARCH.tar.gz
    4. Add go to your path export PATH=$PATH:/usr/local/go/bin
    5. go version to check the current version installed
    6. Start programming.

    Possible errors + fixes: (to be updated)

    If you get a go version xgcc (Ubuntu 4.9.1-0ubuntu1) 4.9.1 linux/amd64 then you did something wrong, so check out this post: Go is printing xgcc version but not go installed version

提交回复
热议问题