1

Raspberry Pi, Model 4, everything up to date with Raspberry Pi OS. I execute the following commands:

sudo apt install emacs (verson 26.1)

mkdir .emacs.d

emacs

then

M-x package-refresh-contents

which gives the error message:

Failed to download the gnu archive

I have tried a couple of things from these links:

Failed to download 'gnu' archive

https://stackoverflow.com/questions/26108655/error-updating-emacs-packages-failed-to-download-gnu-archive

But I haven't gotten anything to succeed yet.

6
  • What does C-h v package-archives RET say?
    – NickD
    Jul 28, 2020 at 17:02
  • Have to check later, but initially I had set the package-archives to the standard options for elpa and melpa: https://melpa.org/#/getting-started, I was able to pull packages from melpa, but not from elpa
    – Vince W.
    Jul 28, 2020 at 17:26
  • Make sure it contains an entry like this: ("gnu" . "https://elpa.gnu.org/packages/").
    – NickD
    Jul 28, 2020 at 17:36
  • (("gnu" . "https://elpa.gnu.org/packages/")), just checked
    – Vince W.
    Jul 28, 2020 at 17:42
  • What's the emacs version? If it is 26.3 or so, I would try the (setq package-set-signature nil) method (from your second link).
    – NickD
    Jul 28, 2020 at 17:58

1 Answer 1

2

If you're running an emacs version earlier than 26.3 (like 26.1), try (setq gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3").

If that works then you're hitting a bug in Emacs that was fixed in 26.3.

1
  • 1
    This worked for me. Emacs version was 26.1.
    – soegaard
    Apr 13, 2021 at 10:16

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.