Error: apply: Cannot find executable "sqlite3"!

Sorry if it doesn’t belong in here, but since may be about development, just wanted to be sure before polluting github without need or reason.

This error…

apply: Cannot find executable “sqlite3”!
… appeared upon emacs boot just after upgrading org-roam and org-roam-server. Nothing in the rest of the computer was changed.

I tried to declare explicitly the packages emacsql-sqlite and emacsql-sqlite3 (because they are dependencies), but still, no success.

(use-package emacsql-sqlite
:load-path “/home/edumerco/.emacs.d/elpa/emacsql-sqlite-20190727.1710”
)

(use-package emacsql-sqlite3
:load-path “/home/edumerco/.emacs.d/elpa/emacsql-sqlite3-20200117.1922”
)

The error persists even if I comment out org-roam section in the init file.

The system is:

  • GNU Emacs 26.1 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.5) of 2019-09-23, modified by Debian
  • Org mode version 9.3.6 (9.3.6-71-g7684b5-elpa @ /home/edumerco/.emacs.d/elpa/org-20200518/)
  • org-roam 20200607.1410
  • org-roam server 20200605.2004

Org-roam diagnostics gives (not much more, I’m afraid):

  • Emacs: GNU Emacs 26.1 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.5)
    of 2019-09-23, modified by Debian
  • Framework: N/A
  • Org: Org mode version 9.3.6 (9.3.6-71-g7684b5-elpa @ /home/edumerco/.emacs.d/elpa/org-20200518/)
  • Org-roam: 1.1.1

A bit more info: upon the 1st time the error appeared today, an org-roam folder was created on my /home directory (that is not where it is configured, it is in a Nextcloud synced directory).

Any tip or clue about what could be happening or how to troubleshoot it?
I hope it may be useful for someone else too that may suffer the same hiccup.
Thanks a lot for any pointer! :smiley:

Take care…

It just sounds like you don’t have sqlite3 installed. On a Debian system try:

sudo apt-get update
sudo apt-get install sqlite3 libsqlite3-dev

Hello @alan.

You nailed perfectly, thank you!
I looked in synaptic before and had some lib sqlite3, but obviously those specific packages were not installed. :man_facepalming:

What baffles me is that I didn’t have them before neither nor had the problem.

Is this a new requirement? (I’m asking because it appeared after the upgrade).
If so, maybe we should warn and/or notice the user… (and talk about in #dev:ux)…

Thanks a lot again! :smiley:

1 Like

Great! :slight_smile:

It is a recent update, the previous version didn’t require sqlite3. The change was made to help Windows users who otherwise had to make actual changes to the org-roam code on their system since sqlite3 is I think the only version they can work with.

OK, then, a couple thoghts…
From the technical POV (I don’t know if/how can be done), maybe *nix users don’t have to install that.

From a UX POV (independently from the previous point), do we have any way to warn users that they have to install this package? I’m a newbie, and got quite nervous when emacs stopped booting with this message… :sweat_smile:

Probably, but that type of warning is beyond what I know how to do :slight_smile: It should definitely be in the docs if it isn’t yet.

Just 10 days ago we were talking with Bastien about this exact issue with org-mode: a generalized way to notice or warn users about changes that could potentially create problems.

Updating the package doesn’t imply that anyone reads the docs, except we have a version brief that can be shown upon updating.

If we can think of a technical way to do it, I can help with the UX aspects (that’s my job). :smiley:

To make things more precise, org-roam always required sqlite3, but in previous versions, a custom-compiled version was used. Most linux distributions ship with the required tooling to compile the executable, so this was transparent to the end user. Now system sqlite3 is used.

I feel like “cannot find executable sqlite3” is already a pretty telling error message. Ideally, changelogs (diffs) would be shown on package updates, but that’s probably going to be a lot of noise anyway, and would likely be ignored.

1 Like

From a UX POV (independently from the previous point), do we have any way to warn users that they have to install this package?

I feel like “cannot find executable sqlite3” is already a pretty telling error message.

For a technically knowledgeable person, yes. :slight_smile:
However, and having some basic understanding of my system, I searched on synaptic and found quite some sqlite3 libraries installed, and so, assumed that the required pieces were present. How could I knew that those were not the specific required ones?

I’m asking this not for me, but for anyone that could stumble with this issue (or it’s generalized way) in the future.

Ideally, changelogs (diffs) would be shown on package updates, but that’s probably going to be a lot of noise anyway, and would likely be ignored.

That could be true. But a brief message on those changelogs (I didn’t saw them, I look on paradox about that but it’s outside the scope of this thread) could warn us about potentially breaking changes…
:slight_smile:

As annoying as those breaking changes might be, they’re few and far between, so I don’t think we need to worry too much about those. We could ship our own warning system for those changes, similar to how we handle the rebuilding of the database, but that’d be overkill, and I think this should be handled upstream.

It’d be nice if we could implement some functionalities of Gentoo’s Portage into package.el, though, notably the ability to warn users on update.

As annoying as those breaking changes might be, they’re few and far between, so I don’t think we need to worry too much about those.

Great to know. And this sharing space works beautifully well to help, too. :wink:

We could ship our own warning system for those changes, similar to how we handle the rebuilding of the database, but that’d be overkill, and I think this should be handled upstream.
It’d be nice if we could implement some functionalities of Gentoo’s Portage into package.el , though, notably the ability to warn users on update.

As you said, that is an upstream issue.
Sorry if I was being primed by discussing exactly this issue a few days ago.

Thanks a lot again for all your help (and org-roam). :smiley:

Hi @edumerco, @jethro, @zaeph, @alan

I realise that this thread has concluded, and I don’t disagree with the direction.
I just thought it was an interesting avenue to explore from an UX perspective.

It seems that Org-roam is attracting a new group of users, who would not otherwise be interested in even trying out Emacs if it were not for Org-roam. Many of them might be cool kids with a shiny Macbook (macOS comes with sqlite3 installed), but some would be definitely Windows users.

Just as a playful exploration, I took the liberty of whipping this up (see the screen capture below).
I followed the example I see in the error messages in org-roam-completion (example).

It’s laughably simple.
I have sent a PR for transparency and perhaps some discussion; others can inspect it, and if interested, try it.

Fine to decline it after looking, or keeping it for the purpose of demonstration—I’ll leave that up to you.

Hello @nobiot

Completely agreed. That is (a bit less) the case also with org-mode in general, and that’s why we were talking about the same topic just a few days ago with the org-mode maintainer.

And it’s a good thing: we have these challenges because we are reaching other Users that are from different, new, backgrounds. More diversity is less control but more power. :wink:

@nobiot, if we were near and not in a pandemic, I would hug you. I owe you a beer, coffee, chocolate or similar if we ever encounter in person. :hugs:

Even more (if possible) important… can we generalize your idea?

From a UX POV, from good to great, it would be:

  1. an error with a helpful message (like this).
  2. no error, just a situation to explain with an actionable suggestion (maybe a link to the direct node that treats this issue in a wiki or documentation? is https://org-roam.github.io/org-roam/manual/Post_002dInstallation-Tasks.html#Post_002dInstallation-Tasks ok?).
  3. no error or situation at all (emacs saying “wait a moment, I’m installing something that we need to roam” while installing it; of course, totally out of bounds here and now). ;D

Your solution has the grace of perfect balance in the precise moment: costs almost nothing (except your dedication, of course) and makes a huge difference.

Thanks a lot… :smiley:

With the URL, I opted for https://org-roam.github.io/org-roam/manual/Installation.html

Two reasons:

  1. It seems this area called “echo” does not allow for clickable link to be set—a long URL is not really user-friendly (you need to somehow go to see echo—C-h e, copy and paste to your browser
  2. The documentation is still under construction, and, at least to me, the info on sqlite3 probably should be prep before installing Org-roam, not part of “post” installation

I think voice and tone of these error message are important part of UX for computer applications. I also dropped “Please” before the imperatives “Ensure” and “Refer to”. To me, this is more in line with the overall terse and neutral tone of Emacs in general—an “impersonal and yet useful” tone. It would be up for discussion, I guess.

progfolio reviewed the PR (see image below), I made change, and it might be accepted in the end—I will leave it to the project.

For updating the documentation, perhaps the project could use your help :wink:
I’d be happy to add Windows part if that’s useful.

EDIT: now that I tried it, the URL should have been: https://org-roam.github.io/org-roam/manual/Installation (without the .html at the end), but that’s OK. The URL will likely be different after the documentation specific to sqlite3 is added.

I think voice and tone of these error message are important part of UX for computer applications. […]

For this, and communications/interactions in general (even among humans). :wink:

For updating the documentation, perhaps the project could use your help :wink:

And I will help, for sure.

I was booked up a bit before with org-mode (I’m starting with the tutorials part), but I will, for sure. I want to help org-roam as I can. Emacs + org-mode + org-roam is the knowledge worker dream come true. :smiley:

1 Like

I’m on Win 10 and continue to have sqlite3 problems. I have C:/sqlite in the PATH environmental variable, I have C:/sqlite/sqlite3.exe, and I have in my config (add-to-list 'exec-path "C:/sqlite/"). Emacs and org-roam are updated. But when I start emacs I still get the error that it cannot find sqlite3. @nobiot or others, any ideas?

Try removing the last slash to make it: (add-to-list 'exec-path "C:/sqlite") – this may not solve the problem, but the .emacs file in my guide does not have the last forward slash.

  1. What does the error exactly say?
  2. After the error, does the startup process halt halfway, or can you start using Emacs as normal?
  3. After 2, can you use Org-roam without an issue?
  4. After the error, and when you can start using Emacs, evaluate (executable-find "sqlite3"). What message do you get?