Doom-emacs: A Bug on fresh installation

Created on 22 Jul 2019  Â·  15Comments  Â·  Source: hlissner/doom-emacs

I make a fresh installation using the develop branch, with this error:

Debugger entered--Lisp error: (file-missing "Cannot open load file" "No such file or directory" "evil")
  require(evil nil nil)
  eval-buffer(#<buffer  *load*-752201> nil "/home/jazb/.emacs.d/modules/editor/evil/config.el" nil t)  ; Reading at buffer position 7147
  load-with-code-conversion("/home/jazb/.emacs.d/modules/editor/evil/config.el" "/home/jazb/.emacs.d/modules/editor/evil/config.el" t nil)
  load("/home/jazb/.emacs.d/modules/editor/evil/config" t nil)
  (condition-case e (load (expand-file-name "config" (plist-get plist :path)) t nil) ((debug doom-error) (signal (car e) (cdr e))) ((debug error) (let* ((source (file-name-sans-extension (expand-file-name "config" (plist-get plist :path)))) (err (cond ((file-in-directory-p source doom-core-dir) (cons ... doom-core-dir)) ((file-in-directory-p source doom-private-dir) (cons ... doom-private-dir)) ((cons ... doom-emacs-dir))))) (signal (car err) (list (file-relative-name (concat source ".el") (cdr err)) e)))))
  (let ((doom--current-module key) (doom--current-flags (plist-get plist :flags))) (condition-case e (load (expand-file-name "config" (plist-get plist :path)) t nil) ((debug doom-error) (signal (car e) (cdr e))) ((debug error) (let* ((source (file-name-sans-extension (expand-file-name "config" ...))) (err (cond (... ...) (... ...) (...)))) (signal (car err) (list (file-relative-name (concat source ".el") (cdr err)) e))))))
  (closure ((force-p) t) (key plist) (let ((doom--current-module key) (doom--current-flags (plist-get plist :flags))) (condition-case e (load (expand-file-name "config" (plist-get plist :path)) t nil) ((debug doom-error) (signal (car e) (cdr e))) ((debug error) (let* ((source (file-name-sans-extension ...)) (err (cond ... ... ...))) (signal (car err) (list (file-relative-name ... ...) e)))))))((:editor . evil) (:flags (+everywhere) :path "/home/jazb/.emacs.d/modules/editor/evil/"))
  maphash((closure ((force-p) t) (key plist) (let ((doom--current-module key) (doom--current-flags (plist-get plist :flags))) (condition-case e (load (expand-file-name "config" (plist-get plist :path)) t nil) ((debug doom-error) (signal (car e) (cdr e))) ((debug error) (let* ((source ...) (err ...)) (signal (car err) (list ... e))))))) #<hash-table equal 34/46 0x49ef51>)
  (if noninteractive nil (maphash (function (lambda (key plist) (let ((doom--current-module key) (doom--current-flags (plist-get plist :flags))) (condition-case e (load (expand-file-name "config" ...) t nil) ((debug doom-error) (signal ... ...)) ((debug error) (let* ... ...)))))) doom-modules) (run-hook-wrapped (quote doom-init-modules-hook) (function doom-try-run-hook)) (condition-case e (load (expand-file-name "config" doom-private-dir) t nil) ((debug doom-error) (signal (car e) (cdr e))) ((debug error) (let* ((source (file-name-sans-extension (expand-file-name "config" doom-private-dir))) (err (cond (... ...) (... ...) (...)))) (signal (car err) (list (file-relative-name (concat source ".el") (cdr err)) e))))))
  (progn (setq doom-init-modules-p t) (if (hash-table-p doom-modules) nil (setq doom-modules (make-hash-table :test (quote equal)))) (maphash (function (lambda (key plist) (let ((doom--current-module key) (doom--current-flags (plist-get plist :flags))) (condition-case e (load (expand-file-name "init" ...) t nil) ((debug doom-error) (signal ... ...)) ((debug error) (let* ... ...)))))) doom-modules) (run-hook-wrapped (quote doom-before-init-modules-hook) (function doom-try-run-hook)) (if noninteractive nil (maphash (function (lambda (key plist) (let ((doom--current-module key) (doom--current-flags ...)) (condition-case e (load ... t nil) (... ...) (... ...))))) doom-modules) (run-hook-wrapped (quote doom-init-modules-hook) (function doom-try-run-hook)) (condition-case e (load (expand-file-name "config" doom-private-dir) t nil) ((debug doom-error) (signal (car e) (cdr e))) ((debug error) (let* ((source (file-name-sans-extension ...)) (err (cond ... ... ...))) (signal (car err) (list (file-relative-name ... ...) e)))))))
  (if (and (or force-p (not doom-init-modules-p)) (not (setq doom-modules nil)) (condition-case e (load (expand-file-name "init" doom-private-dir) t nil) ((debug doom-error) (signal (car e) (cdr e))) ((debug error) (let* ((source (file-name-sans-extension ...)) (err (cond ... ... ...))) (signal (car err) (list (file-relative-name ... ...) e)))))) (progn (setq doom-init-modules-p t) (if (hash-table-p doom-modules) nil (setq doom-modules (make-hash-table :test (quote equal)))) (maphash (function (lambda (key plist) (let ((doom--current-module key) (doom--current-flags ...)) (condition-case e (load ... t nil) (... ...) (... ...))))) doom-modules) (run-hook-wrapped (quote doom-before-init-modules-hook) (function doom-try-run-hook)) (if noninteractive nil (maphash (function (lambda (key plist) (let (... ...) (condition-case e ... ... ...)))) doom-modules) (run-hook-wrapped (quote doom-init-modules-hook) (function doom-try-run-hook)) (condition-case e (load (expand-file-name "config" doom-private-dir) t nil) ((debug doom-error) (signal (car e) (cdr e))) ((debug error) (let* ((source ...) (err ...)) (signal (car err) (list ... e))))))))
  doom-initialize-modules()
  (if noninteractive nil (doom-initialize-modules))
  eval-buffer(#<buffer  *load*-233632> nil "/home/jazb/.emacs.d/core/core.el" nil t)  ; Reading at buffer position 21039
  load-with-code-conversion("/home/jazb/.emacs.d/core/core.el" "/home/jazb/.emacs.d/core/core.el" nil t)
  require(core "/home/jazb/.emacs.d/core/core")
  eval-buffer(#<buffer  *load*> nil "/home/jazb/.emacs.d/init.el" nil t)  ; Reading at buffer position 4522
  load-with-code-conversion("/home/jazb/.emacs.d/init.el" "/home/jazb/.emacs.d/init.el" t t)
  load("/home/jazb/.emacs.d/init" t t)
  #f(compiled-function () #<bytecode 0x1df989>)()
  command-line()
  normal-top-level()

The output that doom doctor is:

Emacs v26.2
Doom v2.0.9 (nil)
shell: /usr/bin/fish
Compiled with: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS
  GLIB NOTIFY ACL GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
  TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS LIBSYSTEMD LCMS2
uname -msrv: Linux 4.19.59-1-MANJARO #1 SMP PREEMPT Mon Jul 15 18:23:58 UTC 2019
  x86_64

Checking Emacs
  Checking your Emacs version is 25.3 or newer...
  Checking if your version of Emacs has changed recently...
  Checking for Emacs config conflicts...
  Checking for private config conflicts...
  Checking for stale elc files...
Checking your system...
  Checking gnutls/openssl...
  Testing your root certificates...
  Checking for GNU/BSD tar...
Checking DOOM Emacs...
Attempt to load DOOM failed (modules/editor/evil/config.el (file-missing
  Cannot open load file No such file or directory evil))


There is 1 warning!

On the install process doing the quickstart process the next packages fail to install

Doom core autoloads is up-to-date
Looking for packages to install...
Installing xclip
  FATAL ERROR:  (error Package ‘xclip-’ is unavailable)
  Run again with the -d flag for details
Installing undo-tree
  FATAL ERROR:  (error Package ‘undo-tree-’ is unavailable)
  Run again with the -d flag for details
Installing gnu-elpa-keyring-update
  FATAL ERROR:  (error Package ‘gnu-elpa-keyring-update-’ is unavailable)
  Run again with the -d flag for details
Installing evil-anzu
  FATAL ERROR:  (error Package ‘undo-tree-0.6.3’ is unavailable)
  Run again with the -d flag for details
Installing evil-goggles
  FATAL ERROR:  (error Package ‘undo-tree-0.6.3’ is unavailable)
  Run again with the -d flag for details
Installing treemacs-evil
  FATAL ERROR:  (error Package ‘undo-tree-0.6.3’ is unavailable)
  Run again with the -d flag for details
Installing evil
  FATAL ERROR:  (error Package ‘undo-tree-0.6.3’ is unavailable)
  Run again with the -d flag for details
Installing evil-args
  FATAL ERROR:  (error Package ‘undo-tree-0.6.3’ is unavailable)
  Run again with the -d flag for details
Installing evil-commentary
  FATAL ERROR:  (error Package ‘undo-tree-0.6.3’ is unavailable)
  Run again with the -d flag for details
Installing evil-embrace
  FATAL ERROR:  (error Package ‘undo-tree-0.6.3’ is unavailable)
  Run again with the -d flag for details
Installing evil-exchange
  FATAL ERROR:  (error Package ‘undo-tree-0.6.3’ is unavailable)
  Run again with the -d flag for details
Installing evil-indent-plus
  FATAL ERROR:  (error Package ‘undo-tree-0.6.3’ is unavailable)
  Run again with the -d flag for details
Installing evil-textobj-anyblock
  FATAL ERROR:  (error Package ‘undo-tree-0.6.3’ is unavailable)
  Run again with the -d flag for details
Installing evil-snipe
  FATAL ERROR:  (error Package ‘undo-tree-0.6.3’ is unavailable)
  Run again with the -d flag for details
Installing evil-surround
  FATAL ERROR:  (error Package ‘undo-tree-0.6.3’ is unavailable)
  Run again with the -d flag for details
Installing evil-visualstar
  FATAL ERROR:  (error Package ‘undo-tree-0.6.3’ is unavailable)
  Run again with the -d flag for details
Installing exato
  FATAL ERROR:  (error Package ‘undo-tree-0.6.3’ is unavailable)
  Run again with the -d flag for details
Installing evil-collection
  FATAL ERROR:  (error Package ‘undo-tree-0.6.3’ is unavailable)
  Run again with the -d flag for details
Installing evil-vimish-fold
  FATAL ERROR:  (error Package ‘undo-tree-0.6.3’ is unavailable)
  Run again with the -d flag for details
Installing evil-multiedit
  FATAL ERROR:  (error Package ‘undo-tree-0.6.3’ is unavailable)
  Run again with the -d flag for details
Installing evil-mc`
  FATAL ERROR:  (error Package ‘undo-tree-0.6.3’ is unavailable)
  Run again with the -d flag for details
Installing evil-magit
  FATAL ERROR:  (error Package ‘undo-tree-0.6.3’ is unavailable)
  Run again with the -d flag for details
Installing csv-mode
  FATAL ERROR:  (error Package ‘csv-mode-’ is unavailable)
  Run again with the -d flag for details
Installing evil-org
  FATAL ERROR:  (error Package ‘undo-tree-0.6.3’ is unavailable)
  Run again with the -d flag for details
Finished!

Done!
external packages resolved

Most helpful comment

This appears to be tied to the same issue that is causing #1566. Long story short: I'm not sure what changed, but Emacs now has a lot of trouble connecting to the GNU ELPA repository. This appears to be tied to a known gnutls bug in Emacs 26.x. There is no satisfactory fix for this, but there are a couple workarounds:

  1. Use insecure mode: doom --insecure quickstart. This will use the HTTP sources instead.

  2. Switch to the straight branch of Doom Emacs. This was published just yesterday, but is the direction Doom will be heading. It drops its current package manager (powered by package.el and quelpa) and replaces it with straight.el. This will side-step your issue. Unfortunately, this may cause breakages if you're already an established Doom user with a larger config, but if you're feeling adventurous, I talk more about in another thread.

  3. I've heard some people have temporarily gotten around the issue by disabling TLS 1.3 with:

;; add to ~/.doom.d/init.el
(setq gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3")

Some folks tell me this doesn't work, however, so your mileage may vary. Hope that helps!

All 15 comments

This appears to be tied to the same issue that is causing #1566. Long story short: I'm not sure what changed, but Emacs now has a lot of trouble connecting to the GNU ELPA repository. This appears to be tied to a known gnutls bug in Emacs 26.x. There is no satisfactory fix for this, but there are a couple workarounds:

  1. Use insecure mode: doom --insecure quickstart. This will use the HTTP sources instead.

  2. Switch to the straight branch of Doom Emacs. This was published just yesterday, but is the direction Doom will be heading. It drops its current package manager (powered by package.el and quelpa) and replaces it with straight.el. This will side-step your issue. Unfortunately, this may cause breakages if you're already an established Doom user with a larger config, but if you're feeling adventurous, I talk more about in another thread.

  3. I've heard some people have temporarily gotten around the issue by disabling TLS 1.3 with:

;; add to ~/.doom.d/init.el
(setq gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3")

Some folks tell me this doesn't work, however, so your mileage may vary. Hope that helps!

Quick fix = edit line 56 core/core-packages.el and switch to unsecured. https => "http://elpa.gnu.org/packages/"

@dvogeldev

  1. Use insecure mode: doom --insecure quickstart. This will use the HTTP sources instead.

@hlissner With option 1 it worked excellent, I am testing the straight branch with an emacs in docker, and I tell you about the feedback but so far that option also served me 100%.

Switch to the straight branch of Doom Emacs.

This did not work for me, --insecure did though.

@oguzserbetci Could you expand on how it didn't work for you?

I got it working with:

diff --git a/bin/doom b/bin/doom
index 571a84a3..4ab1941f 100755
--- a/bin/doom
+++ b/bin/doom
@@ -9,7 +9,7 @@
 ":"; [ "$1" = run ] && { cd "$DOOMBASE"; shift; exec $EMACS -q --no-splash -l bin/doom "$@"; exit 0; }
 ":"; exec $EMACS --script "$0" -- "$@"
 ":"; exit 0
-
+(setq gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3")
 (defun usage ()
   (with-temp-buffer
     (insert (format! "%s %s [COMMAND] [ARGS...]\n"

Yes, it was mentioned in https://github.com/hlissner/doom-emacs/issues/1582#issuecomment-513629151. It will only work for some people. Your mileage will vary. I recommend --insecure instead.

In https://github.com/hlissner/doom-emacs/issues/1582#issuecomment-513629151 it mentions patching ~/.doom.d/init.el, which did not work for me since ~/.emacs.d/bin/doom does not load it (and this might be the reason that it might work in some people and not in others). Possibly patching both (~/.doom.d/init.el and ~/.emacs.d/bin/doom) could fix the issue for everyone. Using --insecure should not be the preferred workaround since it's insecure.

The bin/doom script does indeed load ~/.doom.d/init.el before any package management occurs.

To clarify what I meant: among the folks who have tried this, some report gnutls err=[-50] errors _with_ the gnutls-algorithm-priority while some people get bad request errors _without_ the fix (which is what the OP is experiencing).

So if the fix doesn't work, --insecure is your only option (besides switching to the straight branch).

The bin/doom script does indeed load ~/.doom.d/init.el before any package management occurs.

My bad. It looks like I was patching ~/.doom.d/config.el (or packages.el) instead of ~/.doom.d/init.el.
Sorry for the confusion and thanks for the clarification.

@oguzserbetci Could you expand on how it didn't work for you?

Sorry for being so succinct. I tried again from clean pull. And using the straight branch worked! Thanks :)

Considering --secure worked for the OP and the straight branch is working for others (and it's due to be merged into develop this Sunday), I'll consider this issue resolved. Let me know if that isn't the case and I'll reopen it. Thanks for your help and comments!

Is straight merged into develop, yet? I just did a fresh install (git clone ... bin/doom quickstart) and got the same error messages again. Switched to branch straight and had no issue. Looks like the branch is not merged, yet?

@hlissner
Does using the ./doom --insecure quickstart mean future packages are downloaded through http?
If so then how can --secure be invoked after install?
:)

Was this page helpful?
0 / 5 - 0 ratings