Home 技术笔记 Linux Ubuntu 下载并安装 ...

Ubuntu 下载并安装 golang 编译器

0

golang 的官方下载页:

https://golang.org/dl/

最新的版本的版本号,例如:1.19

下载
wget https://golang.org/dl/go1.19.1.linux-amd64.tar.gz
解压
sudo tar -C /usr/local -xzf go1.19.1.linux-amd64.tar.gz
设置环境变量
echo "export PATH=$PATH:/usr/local/go/bin" >> ~/.profile
echo "export GOPATH=~/.go" >> ~/.profile
环境变量立即生效
source ~/.profile
查看版本
go version

NO COMMENTS

LEAVE A REPLY

Please enter your comment!
Please enter your name here

退出移动版