|
米尔开发板上没有Go运行环境,需要先编译GO环境源码,本次编译的是Go1.19.4版本,根据网上资料在编译如下步骤的时候出现问题:
mi@MI:/usr/local/go/src$ sudo GOROOT_BOOTSTRAP=/usr/local/go1.4 CC_FOR_TARGET=aarch64-poky-linux-gcc CXX_FOR_TARGET=aarch64-poky-linux-g++ CGO_ENABLED=1 GOOS=linux GOARCH=arm GOARM=7 ./make.bash
Building Go cmd/dist using /usr/local/go1.4. (go1.4-bootstrap-20170531 linux/amd64)
go tool dist: cannot invoke C compiler ["aarch64-poky-linux-gcc"]: exec: "aarch64-poky-linux-gcc": executable file not found in $PATH
Go needs a system C compiler for use with cgo.
To set a C compiler, set CC=the-compiler.
To disable cgo, set CGO_ENABLED=0.
不知道如何下手排查这个问题!!!
|
|