Golang Linux 编译

1、下载Golang

mkdir /home/debian/golang
cd /home/debian/golang
wget https://golang.google.cn/dl/go1.16.4.linux-amd64.tar.gz
tar -xvf go1.16.4.linux-amd64.tar.gz

2、设置环境变量

vim ~/.bashrc
export PATH=$PATH:/home/debian/golang/go/bin
export CGO_ENABLED=1
export GOOS=linux
export GOARCH=arm64
export GOARM=8
export CC=aarch64-linux-gnu-gcc
export CXX=aarch64-linux-gnu-g++
export AR=aarch64-linux-gnu-ar
source ~/.bashrc

 

上一篇:2020.9.20


下一篇:一次华为昇腾服务器OS部署过程