You probably want to disable cgo: Go's stdlib has pure-Go implementations
go
dev.to
CGO_ENABLED defaults to 1. That means a standard go build produces a binary that links against C libraries (e.g., glibc) at runtime. For many parts of the Go standard library, there is a C-backed implementation and a pure-Go implementation. CGO_ENABLED selects which one gets compiled in. Pure-Go alternatives also exist for third-party libraries, so it is likely you can turn off cgo by setting CGO_ENABLED=0. Whether to use C libraries or not is a build-time decision, not a runtime fallback like