Replies: 6 comments 7 replies
-
where answeer beach |
Beta Was this translation helpful? Give feedback.
-
Set the You can set the variable using |
Beta Was this translation helpful? Give feedback.
-
sames issues here |
Beta Was this translation helpful? Give feedback.
-
install sudo apt-get install build-essential libsqlite3-dev This is how I solved it |
Beta Was this translation helpful? Give feedback.
-
First of all check CGO_ENABLED value: |
Beta Was this translation helpful? Give feedback.
-
If anyone is currently working with Dockerfile and has encountered a similar issue, I found that adding the following lines to my Dockerfile resolved the problem (ref): FROM golang:1.21-alpine AS go-builder
ENV CGO_ENABLED=1
RUN apk add --no-cache gcc musl-dev
RUN go build -ldflags='-s -w -extldflags "-static"' -o /bin/mym ./cmd/mym
# ... I found this solution by referring to the Dockerfile in the |
Beta Was this translation helpful? Give feedback.
-
I am learning gorm, with authoritative document at https://gorm.io/docs/index.html
File
vy_sqlite.go
log
How to fix it?
https://stackoverflow.com/questions/75543150/failed-to-initialize-database-got-error-binary-was-compiled-with-cgo-enabled-0
Beta Was this translation helpful? Give feedback.
All reactions