下载 Go 源码包:https://golang.org/dl/go1.17.linux-amd64.tar.gz

    1. $ sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go1.17.linux-amd64.tar.gz
    2. # 写入 .zshrc
    3. export PATH=$PATH:/usr/local/go/bin

    检查是否安装成功:

    1. $ go version
    2. go version go1.17 linux/amd64