golang在Windows环境编译Linux可执行文件
下载go和git并安装 https://golang.org/dl/ https://git-scm.com/downloads 下载gdrive的golang源码: https://github.com/gdrive-org/gdrive/archive/master.zip 编译 SET CGO_ENABLED=0 SET GOOS=linux SET GOARCH=386 go get github.com/prasmussen/gdrive go build -ldflags "-w -s" 如果编译64位版本,上面GOARCH改为amd64;如果编译arm版本上面GOARCH改为ar…