Skip to content

Error loading shared library libresolv.so.2 on Alpine in Go 1.20 #59304

@bep

Description

@bep

I assume this is related to the changes mentioned here: https://tip.golang.org/doc/go1.20#cgo -- and that the libresolv library isn't bundled with Go anymore.

I have not found any workaround other than building with the -extldflags "-static" flag.

We currently build with:

CGO_ENABLED=1 go build -buildmode exe -tags extended

See gohugoio/hugo#10839

/cc @axilleas

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions