Home » Programming Languages » Go Language Programs » How to resolve error : ” no buildable Go source files in “

How to resolve error : ” no buildable Go source files in “

Sometimes when we try to compile an unknown go package, we can see an error like “no buildable Go source files in”, the possible solution could be,

Check if the package which shows error “no buildable Go source files in” is using C code, like

import "C"

in the source file, in that case, we might see an error, when we try to compile as “go build”, most probably when we try to cross compile that code,

The solution is to add “CGO_ENABLED=1” while building the code,

CGO_ENABLED=1 go build
Halo MCC - How to Fix Fatal Error -...
Halo MCC - How to Fix Fatal Error - PC

Leave a Comment

Sign up to our newsletter!