直接安装yum -y install golang,版本太低了,用下面方法来安装吧

cd /usr/local
wget https://studygolang.com/dl/golang/go1.15.7.linux-amd64.tar.gz
tar -zxvf go1.15.7.linux-amd64.tar.gz -C ./


vi /etc/profile
添加

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

重载配置 source /etc/profile 使之生效

标签: none

添加新评论