Doom-emacs: [BUG] Failed to download 'gnu' archive

Created on 20 Jul 2019  Β·  4Comments  Β·  Source: hlissner/doom-emacs

Describe the issue
Start with a brief 1 or 2 sentence summary of issue.
I have tried to install doom multiple times and I get the same error after reinstalling emacs, removing all related files etc.

Envvar successfully generated
Installing plugins
Looking for packages to install...
123 packages will be installed:

+ ace-link (elpa)
+ ace-window (elpa)
+ all-the-icons (elpa)
+ amx (elpa)
+ anzu (elpa)
+ auto-yasnippet (elpa)
+ avy (elpa)
+ better-jumper (elpa)
+ buttercup (elpa)
+ centered-window (quelpa)
+ command-log-mode (elpa)
+ company (elpa)
+ company-dict (elpa)
+ company-prescient (elpa)
+ company-shell (elpa)
+ counsel (elpa)
+ counsel-dash (elpa)
+ counsel-projectile (elpa)
+ csv-mode (elpa)
+ dash-docs (elpa)
+ dhall-mode (elpa)
+ dired-k (elpa)
+ dired-rsync (elpa)
+ diredfl (elpa)
+ doom-modeline (elpa)
+ doom-snippets (quelpa)
+ doom-themes (elpa)
+ dotenv-mode (elpa)
+ dtrt-indent (elpa)
+ dumb-jump (elpa)
+ elisp-def (elpa)
+ elisp-demos (elpa)
+ esup (elpa)
+ evil (elpa)
+ evil-anzu (elpa)
+ evil-args (elpa)
+ evil-collection (elpa)
+ evil-commentary (elpa)
+ evil-easymotion (elpa)
+ evil-embrace (elpa)
+ evil-escape (elpa)
+ evil-exchange (elpa)
+ evil-goggles (elpa)
+ evil-indent-plus (elpa)
+ evil-magit (elpa)
+ evil-mc (elpa)
+ evil-multiedit (elpa)
+ evil-numbers (quelpa)
+ evil-org (elpa)
+ evil-snipe (elpa)
+ evil-surround (elpa)
+ evil-textobj-anyblock (elpa)
+ evil-vimish-fold (elpa)
+ evil-visualstar (elpa)
+ exato (elpa)
+ flycheck (elpa)
+ flycheck-cask (elpa)
+ flycheck-popup-tip (elpa)
+ forge (elpa)
+ general (elpa)
+ git-gutter-fringe (elpa)
+ git-link (elpa)
+ git-timemachine (elpa)
+ gitconfig-mode (elpa)
+ gitignore-mode (elpa)
+ gnu-elpa-keyring-update (elpa)
+ graphql-mode (elpa)
+ helpful (elpa)
+ hide-mode-line (elpa)
+ highlight-numbers (elpa)
+ highlight-quoted (elpa)
+ hl-todo (elpa)
+ htmlize (elpa)
+ hydra (elpa)
+ ivy (elpa)
+ ivy-hydra (elpa)
+ ivy-rich (elpa)
+ ivy-xref (elpa)
+ json-mode (elpa)
+ macrostep (elpa)
+ magit (elpa)
+ magit-gitflow (elpa)
+ magit-todos (elpa)
+ markdown-mode (elpa)
+ markdown-toc (elpa)
+ nav-flash (elpa)
+ ns-auto-titlebar (elpa)
+ ob-async (elpa)
+ ob-ipython (elpa)
+ org-bullets (quelpa)
+ org-download (elpa)
+ org-plus-contrib (elpa)
+ org-tree-slide (elpa)
+ org-yt (quelpa)
+ osx-clipboard (elpa)
+ overseer (elpa)
+ ox-clip (elpa)
+ ox-pandoc (elpa)
+ ox-reveal (elpa)
+ pcre2el (elpa)
+ persp-mode (elpa)
+ projectile (elpa)
+ protobuf-mode (elpa)
+ quickrun (elpa)
+ rainbow-delimiters (elpa)
+ restart-emacs (elpa)
+ rotate-text (quelpa)
+ smartparens (elpa)
+ solaire-mode (elpa)
+ swiper (elpa)
+ toc-org (elpa)
+ toml-mode (elpa)
+ treemacs (elpa)
+ treemacs-evil (elpa)
+ treemacs-magit (elpa)
+ treemacs-projectile (elpa)
+ undo-tree (elpa)
+ vi-tilde-fringe (elpa)
+ wgrep (elpa)
+ which-key (elpa)
+ ws-butler (elpa)
+ yaml-mode (elpa)
+ yasnippet (elpa)

Proceed? (y or n) y

Refreshing package archives
Contacting host: elpa.gnu.org:443
Failed to download β€˜gnu’ archive.
Contacting host: melpa.org:443
Contacting host: orgmode.org:443
Package refresh done
Installing dotenv-mode
βœ“ DONE
Installing osx-clipboard
βœ“ DONE
Installing ns-auto-titlebar
βœ“ DONE
Installing all-the-icons
βœ“ DONE
Installing hide-mode-line
βœ“ DONE
Installing highlight-numbers
βœ“ DONE
Installing rainbow-delimiters
βœ“ DONE
Installing restart-emacs
βœ“ DONE
Installing better-jumper
βœ“ DONE
Installing command-log-mode
βœ“ DONE
Installing dtrt-indent
βœ“ DONE
Installing helpful
βœ“ DONE
Installing pcre2el
βœ“ DONE
Installing smartparens
βœ“ DONE
Installing undo-tree
  FATAL ERROR:  (error Package β€˜undo-tree-’ is unavailable)
  Run again with the -d flag for details
Installing ws-butler
βœ“ DONE
Installing projectile
βœ“ DONE
Installing general
βœ“ DONE
Installing which-key
βœ“ DONE
Installing hydra
βœ“ DONE
Installing gnu-elpa-keyring-update
  FATAL ERROR:  (error Package β€˜gnu-elpa-keyring-update-’ is unavailable)
  Run again with the -d flag for details
Installing esup
βœ“ DONE
Installing buttercup
βœ“ DONE
Installing company
βœ“ DONE
Installing company-dict
βœ“ DONE
Installing company-prescient
βœ“ DONE
Installing amx
βœ“ DONE
Installing ivy
βœ“ DONE
Installing counsel
βœ“ DONE
Installing counsel-projectile
βœ“ DONE
Installing swiper
⚠ ALREADY INSTALLED
Installing ivy-hydra
βœ“ DONE
Installing ivy-rich
βœ“ DONE
Installing wgrep
βœ“ DONE
Installing doom-themes
βœ“ DONE
Installing solaire-mode
βœ“ DONE
Installing hl-todo
βœ“ DONE
Installing doom-modeline
βœ“ DONE
Installing anzu
βœ“ DONE
Installing evil-anzu
  FATAL ERROR:  (error Package β€˜undo-tree-0.6.3’ is unavailable)
  Run again with the -d flag for details
Installing nav-flash
βœ“ DONE
Installing evil-goggles
  FATAL ERROR:  (error Package β€˜undo-tree-0.6.3’ is unavailable)
  Run again with the -d flag for details
Installing treemacs
βœ“ DONE
Installing treemacs-evil
  FATAL ERROR:  (error Package β€˜undo-tree-0.6.3’ is unavailable)
  Run again with the -d flag for details
Installing treemacs-projectile
βœ“ DONE
Installing treemacs-magit

Loading async...
βœ“ DONE
Installing git-gutter-fringe
βœ“ DONE
Installing vi-tilde-fringe
βœ“ DONE
Installing ace-window
⚠ ALREADY INSTALLED
Installing persp-mode
βœ“ DONE
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-easymotion
βœ“ DONE
Installing evil-embrace
  FATAL ERROR:  (error Package β€˜undo-tree-0.6.3’ is unavailable)
  Run again with the -d flag for details
Installing evil-escape
βœ“ DONE
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-numbers
βœ“ DONE
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 yasnippet
βœ“ DONE
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 rotate-text
βœ“ DONE
Installing auto-yasnippet
βœ“ DONE
Installing doom-snippets
βœ“ DONE
Installing diredfl
βœ“ DONE
Installing dired-k
βœ“ DONE
Installing dired-rsync
βœ“ DONE
Installing git-link
βœ“ DONE
Installing git-timemachine
βœ“ DONE
Installing gitconfig-mode
βœ“ DONE
Installing gitignore-mode
βœ“ DONE
Installing quickrun
βœ“ DONE
Installing flycheck
βœ“ DONE
Installing flycheck-popup-tip

Loading async...
βœ“ DONE
Installing dumb-jump
βœ“ DONE
Installing ivy-xref
βœ“ DONE
Installing dash-docs
βœ“ DONE
Installing counsel-dash
βœ“ DONE
Installing magit
⚠ ALREADY INSTALLED
Installing forge
βœ“ DONE
Installing magit-gitflow
βœ“ DONE
Installing magit-todos
βœ“ DONE
Installing evil-magit
  FATAL ERROR:  (error Package β€˜undo-tree-0.6.3’ is unavailable)
  Run again with the -d flag for details
Installing graphql-mode
βœ“ DONE
Installing json-mode
βœ“ DONE
Installing toml-mode
βœ“ DONE
Installing yaml-mode
βœ“ DONE
Installing csv-mode
  FATAL ERROR:  (error Package β€˜csv-mode-’ is unavailable)
  Run again with the -d flag for details
Installing dhall-mode
βœ“ DONE
Installing protobuf-mode
βœ“ DONE
Installing highlight-quoted
βœ“ DONE
Installing macrostep
βœ“ DONE
Installing overseer
βœ“ DONE
Installing elisp-def
βœ“ DONE
Installing elisp-demos
βœ“ DONE
Installing flycheck-cask
βœ“ DONE
Installing markdown-mode
⚠ ALREADY INSTALLED
Installing markdown-toc
βœ“ DONE
Installing org-plus-contrib
βœ“ DONE
Installing org-bullets
βœ“ DONE
Installing toc-org
βœ“ DONE
Installing evil-org
  FATAL ERROR:  (error Package β€˜undo-tree-0.6.3’ is unavailable)
  Run again with the -d flag for details
Installing htmlize
βœ“ DONE
Installing ox-clip
βœ“ DONE
Installing org-yt
βœ“ DONE
Installing ob-async
βœ“ DONE
Installing org-download
βœ“ DONE
Installing ob-ipython
βœ“ DONE
Installing ox-pandoc
βœ“ DONE
Installing centered-window
βœ“ DONE
Installing org-tree-slide
βœ“ DONE
Installing ox-reveal
βœ“ DONE
Installing company-shell
βœ“ DONE
Installing avy
⚠ ALREADY INSTALLED
Installing ace-link
βœ“ DONE
Finished!`

I think the main error is caused by this:

Refreshing package archives
Contacting host: elpa.gnu.org:443
Failed to download β€˜gnu’ archive.

Steps to reproduce

  1. git clone https://github.com/hlissner/doom-emacs ~/.emacs.d
    ~/.emacs.d/bin/doom quickstart
bug external obsolete re26 packages resolved

Most helpful comment

Oh right, it occurred to me you can also turn on insecure mode: doom --insecure quickstart. It will avoid TLS altogether and download packages from their HTTP sources.

All 4 comments

I had the same problem and I think it's caused by commit 8b27d19e0bf036b242147b0e4a70cd337e10f2af 'Fix "err=[-50]" gnutls error' (which is the current HEAD). I worked around it by removing .emacs.d, cloning doom again and reverting to the previous commit before running quickstart.

This issue has been haunting me for the past week or so. It _appears_ to be related to this known bug in Emacs 26.x's TLS code: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3434 (which is fixed in 27).

And I had a workaround mentioned in that thread merged into Doom in https://github.com/hlissner/doom-emacs/commit/84d43643c9f7a135740df63a728cc43abb62a405, then reports of err=[-50] gnutls errors came in so I reverted it in https://github.com/hlissner/doom-emacs/commit/8b27d19e0bf036b242147b0e4a70cd337e10f2af, and here we are back at square one.

I don't know why GNU ELPA decided to act up now, after so long, but you can give the fix a try for yourself:

;; in ~/.doom.d/init.el
(defun disable-tls3 (orig-fn &rest args)
  (let ((old-gnutls-algorithm-priority gnutls-algorithm-priority))
    (setq gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3")
    (unwind-protect
        (apply orig-fn args)
      (setq gnutls-algorithm-priority old-gnutls-algorithm-priority))))
(advice-add #'package-refresh-contents :around #'disable-tls3)

On a separate note: within the next day or two I will be publishing a massive update to Doom which integrates straight.el into Doom. It will cause some breakage; you'll have to reinstall all your packages, for one. However, it should sidestep all these issues, and all the issues we've ever had with package.el/quelpa/ELPA (and there've been quite a few).

Oh right, it occurred to me you can also turn on insecure mode: doom --insecure quickstart. It will avoid TLS altogether and download packages from their HTTP sources.

That seemed to work, thank you!

Was this page helpful?
0 / 5 - 0 ratings