美文网首页
linux下Go的安装设置

linux下Go的安装设置

作者: ittony | 来源:发表于2017-08-23 15:29 被阅读0次

1.wget  -c https://storage.googleapis.com/golang/go$VERSION.$OS-$ARCH.tar.gz

2. tar -C /usr/local  -xzf go$VERSION.$OS-$ARCH.tar.gz

3.ln -s /usr/local/go/bin/go  /usr/local/bin

注:其他go/bin下的程序也用ln -s建立连接

4.修改$HOME/.bash_profile,添加

export GOPATH=/Goworkspace

export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin

Note:GOROOT must be set only when installing to a custom location.

相关文章

网友评论

      本文标题:linux下Go的安装设置

      本文链接:https://www.haomeiwen.com/subject/eknddxtx.html