R
Railway14mo 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
Percy14mo ago
Project ID: N/A
Solution
Brody
Brody14mo ago
use a pure go sqlite adapter
Alam
Alam14mo ago
the one without cgo ?
Brody
Brody14mo ago
yep
Alam
Alam14mo ago
Okay , will try that.
Brody
Brody14mo ago
and set CGO_ENABLED back to 0
Alam
Alam14mo ago
Okay Thanks
Brody
Brody14mo ago
no problem!
Alam
Alam14mo ago
It worked ,thanks.
Brody
Brody14mo ago
no problem!
Want results from more Discord servers?
Add your server