I'm new to emacs, and I'm having problems when trying to set up my init.el file to connect to the melpa packages site. I'm using MacOS Big Sur version 11.6, and Emacs version 26.2 (9.0) since there were some problems installing the latest version.

In the init.el file I have put:

(require ‘package)
(setq package-enable-at-startup nil)
(add-to-list ‘package-archives
             ‘(“melpa” . “https://melpa.org/packages/“))

I get the following error message when M-x package-refresh-contents

Making completion list…
Contacting host: elpa.gnu.org:443
Package refresh done
Failed to download ‘gnu’ archive.

I have tried

‘(“melpa” . “https://melpa.org/packages/“)t)

Which does not work.

Does anyone know what I'm doing wrong?

  • 1
    Sometimes MELPA just don't work, so try again later. But for version 26.2, still useful to have this (setq gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3") after package-initialise. Since you are new to Emacs, maybe will be more useful to install emacs version 27.2 as described here: github.com/d12frosted/homebrew-emacs-plus - this will add more libraries needed for org-mode.
    – Ian
    Oct 13 at 11:46
  • The quotes surrounding the strings should be double-quote " rather than two single quotes '', I think. That said, your error message is reporting a failure to download the default gnu archive not melpa at all. Oct 13 at 18:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.