On Debian systems, the emacsql-sqlite binary is built against the system libsqlite3, which may be compiled with different -DSQLITE_* options than assumed by emacsql. For example, emacsql assumes that foreign key support is enabled, but at the time of writing the Debian libsqlite3 does not enable this by default. You may have to patch Lisp code which assumes certain -DSQLITE_* options, for example by adding lines like this: (emacsql connection [:pragma (= foreign_keys 1)]) before making queries. -- Sean Whitton , Sat, 27 Jun 2020 12:45:16 -0700