go 编译报错:build constraints exclude all Go files

报错信息:

package command-line-arguments
        imports github.com/amikos-tech/chroma-go
        imports github.com/amikos-tech/chroma-go/pkg/embeddings/default_ef
        imports github.com/amikos-tech/chroma-go/pkg/tokenizers/libtokenizers: build constraints exclude all Go files in /home/cloudapp/gopkg/pkg/mod/github.com/amikos-tech/[email protected]/pkg/tokenizers/libtokenizers
 

原因:

使用了c的交叉编译,但本机没有c编译环境导致

go 编译报错:build constraints exclude all Go files_第1张图片

解决方法:

安装c编译环境

yum -y install gcc

你可能感兴趣的:(golang,开发语言,后端)