11.11 golang

golang 环境搭建非常简单, 你必须根据系统架构找到合适的版本来安装

比如说,树莓派3b,4b => arm7l

包下载完之后:

sudo cp -rf go /usr/local

配置环境变量, linux的配置文件为~/.profile, macos的为~/.bash_profile

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

为避免每次ssh登陆都要source ~/.profile, 建议装zsh,然后把source ~/.profile写入到~/.zshrc

results matching ""

    No results matching ""