在解决cgo报错提示c compiler "x86_64-linux-musl-gcc" not found的问题时,我们可以按照以下步骤逐一排查和解决: 确认x86_64-linux-musl-gcc编译器是否已安装: 首先,你需要在你的系统上检查x86_64-linux-musl-gcc编译器是否已经安装。这可以通过在终端中运行以下命令来完成: bash x86_64-linux-musl-gcc --...
在mac上构建go项目成linux平台时候,报错如下: # runtime/cgo cgo: C compiler "x86_64-linux-musl-gcc" not found: exec: "x86_64-linux-musl-gcc": executable file not found in $PATH 1. 2. 因为没有安装musl包,执行下面命令安装即可: brew install musl-cross 1....
musl-gcc: command not found On ubuntu I can fix this with apt-get install musl-tools. I suspect there is no workaround for this, but it probably should be noted in the readme that a compiler is required to build this, and specifically musl-gcc if building for the the musl target....