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.

MitchN
  • 15
  • 2
Vince W.
  • 395
  • 2
  • 11
  • What does `C-h v package-archives RET` say? – NickD Jul 28 '20 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 '20 at 17:26
  • Make sure it contains an entry like this: `("gnu" . "https://elpa.gnu.org/packages/")`. – NickD Jul 28 '20 at 17:36
  • `(("gnu" . "https://elpa.gnu.org/packages/"))`, just checked – Vince W. Jul 28 '20 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 '20 at 17:58
  • emacs version is `26.1` That's what is available from the archive for the ppa – Vince W. Jul 30 '20 at 15:46

1 Answers1

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.

Drew
  • 75,699
  • 9
  • 109
  • 225