R
Railway15mo ago
Alam

"error": "Binary was compiled with 'CGO_ENABLED=0', go-sqlite3 requires cgo to work. This is a stub"

I am trying to deploy my golang web api which uses sqlite db to store and retrieve data. I tried to add CGO_ENABLED=1 in the env variables but then it shows that gcc is not available . What should I do ?
Solution:
use a pure go sqlite adapter
Jump to solution
10 Replies
Percy
Percy15mo ago
Project ID: N/A
Solution
Brody
Brody15mo ago
use a pure go sqlite adapter
Alam
AlamOP15mo ago
the one without cgo ?
Brody
Brody15mo ago
yep
Alam
AlamOP15mo ago
Okay , will try that.
Brody
Brody15mo ago
and set CGO_ENABLED back to 0
Alam
AlamOP15mo ago
Okay Thanks
Brody
Brody15mo ago
no problem!
Alam
AlamOP15mo ago
It worked ,thanks.
Brody
Brody15mo ago
no problem!
Want results from more Discord servers?
Add your server