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?

Andrew
  • 541
  • 6
  • 17
  • This looks correct. Is it still not working? It could be a temporary network issue. – Tyler Aug 25 '21 at 13:40
  • Yeah still happening. – Andrew Aug 25 '21 at 17:26
  • Can you open the page "http://melpa.org/packages/" in your web browser? This is strange. – Tyler Aug 27 '21 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 '21 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 '21 at 18:35
  • When I do -Q `gnu` also fails as well as `melpa`. The error is `Failed to verify signature archive-contents.sig` – Andrew Aug 27 '21 at 21:44
  • what version of Emacs are you running? – Tyler Aug 28 '21 at 00:49
  • Does [this](https://emacs.stackexchange.com/questions/60560/error-retrieving-https-elpa-gnu-org-packages-archive-contents-error-http-400) help at all? – NickD Aug 28 '21 at 03:33
  • I just reinstalled 27.2.2 and it is working now? ¯\\_(ツ)_/¯. – Andrew Aug 28 '21 at 04:25

2 Answers2

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")
Y. E.
  • 668
  • 4
  • 8
0

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

Andrew
  • 541
  • 6
  • 17