gaoyoubo / blog.mspring.org

个人博客
0 stars 0 forks source link

Go语言在mac下编译Linux可执行文件 | M-LOG #28

Open gaoyoubo opened 6 years ago

gaoyoubo commented 6 years ago

http://www.mspring.org/2017/06/02/Go%E8%AF%AD%E8%A8%80%E5%9C%A8mac%E4%B8%8B%E7%BC%96%E8%AF%91Linux%E5%8F%AF%E6%89%A7%E8%A1%8C%E6%96%87%E4%BB%B6/

进入源码目录,执行如下命令:1CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build