Closed anderson-comvex closed 9 months ago
Same issue here, I tried to downgrade air version, but still the same: GLIBC_2.32' not found (required by air). Any ideas ?
EDIT : I found a solution. I used debian:latest docker image and I was using air, inside. You can use debian:bookworm (not yet stable), or use comstrek/air image directly.
Try the go install method.
@anderson-comvex I am getting the same issue with v1.42
. What base image are you using in your dockerfile?
This is my Dockerfile - working in Windows 11 WSL2
FROM golang:latest as base
FROM base as dev
RUN go install github.com/cosmtrek/air@latest
WORKDIR /opt/app/api
CMD ["air"]
@anderson-comvex I am getting the same issue with
v1.42
. What base image are you using in your dockerfile?
@feline-fanatic I added the Docker image from Dockerhub we are using as base image on the Issue Description.
The fix is likely to build the app with CGO_ENABLED=0
, assuming no CGO dependencies which will produce a static binary.
I think something in go has changed where it no longer produces static binaries by default, and insteads builds with the shitty CGO toolchain.
Had same issues even now. go install worked, curl gave the error
https://github.com/cosmtrek/air/pull/450 I think this PR should fixed
Description
Air Version:
v1.43
On AMD64 CPU Architectures of Mac Intel, the image is built successfully but when trying to run the container we get
air: /lib/x86_64-linux-gnu/libc.so.6: version
GLIBC_2.32' not found (required by air)`.Tried both Go 1.19 and 1.20.
Air is being installed using:
Additional Details
It looks like the gclib of the images are 2.31 tho when running:
find /lib -iname 'libc*.so'
But for ARM64 on Mac Silicon, seems to be running fine with the libc-2.31
Workaround
Lock the version to
v1.42
or before.