Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

failed to open sqlite3: sql: unknown driver "sqlite" (forgotten import?) #54

Open
jerome-diver opened this issue Sep 18, 2024 · 2 comments

Comments

@jerome-diver
Copy link

The title is the error message at run time.
Fedora-40 distro. I use the Packages RPM DB to be /var/lib/rpm/rpmdb.sqlite file as a string.
So maybe i do not understand what "RPM DB" is in this context (a string of what ? i imagine the file name of the database, but...).
Or something went wrong with the driver. I hear about different database used by rpm depend of the distribution.
Fedora use sqlite3 database. I read about openSuse to use ndb.

@djoreilly
Copy link
Contributor

Maybe you need to do add _ "github.com/glebarez/go-sqlite" to your imports like this:

_ "github.com/glebarez/go-sqlite"

@royroyee
Copy link

royroyee commented Nov 6, 2024

I had the same issue, and adding _ "github.com/glebarez/go-sqlite" to the imports resolved it for me as well.
It would be helpful to have this noted in the README for others who might run into the same problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants