“Golang”的版本间的差异
跳到导航
跳到搜索
第19行: | 第19行: | ||
#export PATH=/usr/local/go/bin/:$PATH | #export PATH=/usr/local/go/bin/:$PATH | ||
#export GOPATH=/root | #export GOPATH=/root | ||
+ | |||
+ | #以前的文章 | ||
+ | #freebsd | ||
+ | https://dl.google.com/go/go1.12.5.freebsd-amd64.tar.gz | ||
+ | #linux | ||
+ | curl -o go1.13.6.linux-amd64.tar.gz https://dl.google.com/go/go1.13.6.linux-amd64.tar.gz | ||
+ | |||
+ | |||
+ | tar -C /usr/local -xzf go1.12.5.freebsd-amd64.tar.gz | ||
+ | |||
+ | |||
+ | |||
+ | export PATH=$PATH:/usr/local/go/bin | ||
+ | |||
+ | source /etc/profile #如果修改的是/etc/profile | ||
+ | source $HOME/.profile #如果修改的是$HOME/.profile | ||
+ | |||
+ | |||
+ | |||
+ | go version | ||
+ | |||
+ | |||
</pre> | </pre> | ||
+ | =see also= | ||
+ | https://golang.google.cn/doc/install#install | ||
+ | |||
+ | [[category:go]] |
2020年6月4日 (四) 06:17的版本
install
wget -c https://dl.google.com/go/go1.14.4.linux-amd64.tar.gz tar -C /usr/local -xzf go$VERSION.$OS-$ARCH.tar.gz tar -xvf go1.14.4.linux-amd64.tar.gz -C /usr/local/ #加入 echo 'export PATH=$PATH:/usr/local/go/bin' >>/etc/profile && source /etc/profile export PATH=/usr/local/go/bin/:$PATH export GOPATH=/root/go #如果你用root运行 #export GOROOT=/usr/local/go/ #export PATH=/usr/local/go/bin/:$PATH #export GOPATH=/root #以前的文章 #freebsd https://dl.google.com/go/go1.12.5.freebsd-amd64.tar.gz #linux curl -o go1.13.6.linux-amd64.tar.gz https://dl.google.com/go/go1.13.6.linux-amd64.tar.gz tar -C /usr/local -xzf go1.12.5.freebsd-amd64.tar.gz export PATH=$PATH:/usr/local/go/bin source /etc/profile #如果修改的是/etc/profile source $HOME/.profile #如果修改的是$HOME/.profile go version