Installation of Org-Roam fails

I try to install Org-Roam on my Mac (with Sequoia), but it fails. Here are my steps:

1.) In .emacs I initialize the MELPA-archive

(use-package package
:config
(add-to-list 'package-archives '(“melpa-stable” . “Package Listing”))
(package-initialize))

2.) Later I try to install ORG-ROAM with:

(use-package org-roam
:ensure t
:demand t ;; Ensure org-roam is loaded by default
:init
(setq org-roam-v2-ack t)
:custom
(org-roam-completion-everywhere t)
:config
(org-roam-db-autosync-mode)
(require 'org-roam-protocol)
(org-roam-setup)
)

3.) But this fails with:

Debugger entered–Lisp error: (error “Package ‘emacsql-sqlite’ (version 1.0.0) is unavai…”)
signal(error (“Package ‘emacsql-sqlite’ (version 1.0.0) is unavai…”))
error(“Package `emacsql-sqlite’ (version 1.0.0) is unavai…”)
package-compute-transaction((#s(package-desc :name org-roam :version (2 2 2) :summary “A database abstraction layer for Org-mode” :reqs ((emacs (26 1)) (dash (2 13)) (org (9 4)) (emacsql (3 0 0)) (emacsql-sqlite (1 0 0)) (magit-section (3 0 0))) :kind tar :archive “MELPA-STABLE” :dir nil :extras ((:url . “GitHub - org-roam/org-roam: Rudimentary Roam replica with Org-mode”)
package-compute-transaction(nil ((org-roam)))
package-install(org-roam)
use-package-ensure-elpa(org-roam (t) (:demand t))

4.) It seem org-roam (2.2.2) requires emacsql-sqlite (1.0.0), but this package is no longer available in MELPA_STABLE.

How can I fix this?

I suggest not to use MELPA-stable and instead use MELPA.

Also, review Getting Started. I don’t see where you specify the URL.

I tried this code in ~/.emacs, but it causes the same problem.

(require 'package)
(add-to-list 'package-archives '(“melpa” . “Package Listing”) t)
(package-initialize)

It seems the Discourse app changes the Melpa-org URL to the string “Package Listing”. But I added the correct URL like documented in the document “Getting Started”.

I don’t think that’s the problem. Other MELPA packages are correctly installed.

The package ‘emacsql-sqlite’ is not listed on MELPA and not on MELPA-STABLE.

I think what you may be missing in your steps is M-x package-refresh-contents or M-x package-list-packages. I use the latter in the video I share below.

These are noted in “Getting started” of MELPA.

Note that you’ll need to run M-x package-refresh-contents or M-x package-list-packages to ensure that Emacs has fetched the MELPA package list before you can install packages with M-x package-install or similar.

The current version available in MELPA does not require emacsql-sqlite. See this screenshot from Emacs. Note it equires emacsql (not emacsql-sqlite).

Here is a 40-second video where I install Org-roam (video taken on 2024-11-23). I have no problem. The steps are simply this:

  1. Paste the snippet from MELPA
  2. Evaluate the snippet
  3. M-x package-list-packages
  4. Wait for Emacs to fetch the MELPA package list (wait for “Loading” to finish)
  5. Find org-roam
  6. Install org-roam

My solution is:

Add to ~/.emacs:

(require 'package)
(add-to-list 'package-archives '(“melpa” . MELPA-URL) t)
(package-initialize)
(package-refresh-contents)

And later:

(use-package org-roam …

Then restart EMACS. This installs all my packages.

1 Like