Sqlite3 (the real one, not the one I'm building) reports error on sample.db

I’m just barely starting the sqlite challenge. My code for #dr6 works, but I tried the “real” sqlite for comparison, and I get an error.

$ ./your_program.sh sample.db .dbinfo
database page size: 4096
$ sqlite3 sample.db .dbinfo
error: no such table: sqlite_dbpage

Is there something weird with my installed sqlite version or is there something up with the sample.db file? sqlite3 --version reports: 3.45.1 2024-01-30 16:01:20 e876e51a0ed5c5b3126f52e532044363a014bc594cfefa87ffb5b82257ccalt1 (64-bit)

Hey @MatrixFrog, could you try running .dbinfo inside sqlite3? It might or might not give a more descriptive error message.

Looks like your SQLite build might be missing the -DSQLITE_ENABLE_DBPAGE_VTAB compile-time option.

Looks like the same error

$ sqlite3 sample.db 
SQLite version 3.45.1 2024-01-30 16:01:20
Enter ".help" for usage hints.
sqlite> .dbinfo
error: no such table: sqlite_dbpage

I tried apt removeing it and then which sqlite3 pointed to ~/Android/Sdk/platform-tools/sqlite3, so maybe I have an old/weird version from when I was trying to do some Android-y stuff. Will see about removing or upgrading that one…

1 Like

alright downloading from SQLite Download Page worked, I guess maybe the current apt package is compiled weirdly or out of date or something

1 Like

According to ChatGPT:

Most prebuilt binaries (including many Linux distros and some Homebrew builds) do not enable -DSQLITE_ENABLE_DBPAGE_VTAB by default.

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.