2

Have started seeing this error after I installed a new version of Emacs. My package code in init file is

(require 'package)
(setq package-archives '(("gnu" . "http://elpa.gnu.org/packages/")
                         ("melpa" . "http://melpa.org/packages/")))
(package-initialize)

This also fails if I use https. What do I need to do to fix this?

9
  • This looks correct. Is it still not working? It could be a temporary network issue.
    – Tyler
    Aug 25, 2021 at 13:40
  • Yeah still happening.
    – Andrew
    Aug 25, 2021 at 17:26
  • Can you open the page "melpa.org/packages" in your web browser? This is strange.
    – Tyler
    Aug 27, 2021 at 17:38
  • Yes, I can open it in my browser. package-list-packages gives a bunch of stale links in Emacs, but if I go to Melpa directly in my browser I am able to download the tar files with the correct dates on the links.
    – Andrew
    Aug 27, 2021 at 17:47
  • Starting Emacs from emacs -Q and running your code exactly, I can get package-list-packages to work fine. What version of Emacs are your running? Do you have any other config in your init file? If you do, can you try running just the code you have here? Maybe there's something else in your init that's interacting.
    – Tyler
    Aug 27, 2021 at 18:35

2 Answers 2

2

Make sure to follow the MELPA Getting started instructions precisely and then read Known Issues sections.

I got the error message "Failed to download ‘MELPA’ archive" on an earlier version of Emacs. In my case, it was fixed at that time by applying described in the Known Issues configuration:

(setq gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3")
0

Reinstalling Emacs 27.2.2 fixed this. I am not sure why it is working now and did not work before.

2
  • Are you behind a proxy? Emacs 27.1 has a bug with authenticated proxies.
    – Daniele
    Sep 1, 2021 at 9:01
  • Nope, not behind a proxy
    – Andrew
    Sep 1, 2021 at 17:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.