I am trying to install auctex via M-x package-install RET auctex.

Unfortunately after a brief splash of Contacting host: elpa.gnu.org:443,

I end up with the message https://elpa.gnu.org/packages/auctex-12.1.2.tar:Bad Request

On a different machine, this seems to work fine - I don't know where this is going wrong.

The top part of my init.el file currently reads:

(require 'package)
(let* ((no-ssl (and (memq system-type '(windows-nt ms-dos))
                    (not (gnutls-available-p))))
       (proto (if no-ssl "http" "https")))
  (when no-ssl
    (warn "\
Your version of Emacs does not support SSL connections,
which is unsafe because it allows man-in-the-middle attacks.
There are two things you can do about this warning:
1. Install an Emacs version that does support SSL and be safe.
2. Remove this warning from your init file so you won't see it again."))

  (add-to-list 'package-archives (cons "melpa-stable" (concat proto "://stable.melpa.org/packages/")) t)
  (when (< emacs-major-version 24)
   ;;  For important compatibility libraries like cl-lib
    (add-to-list 'package-archives (cons "gnu" (concat proto "://elpa.gnu.org/packages/")))))


Any ideas as to what I should try? This is Emacs 26.2 btw.

  • @Drew OK, trimmed it down a bit further. Commented Aug 16, 2019 at 7:43

1 Answer 1


Elpa seems to be having issues again. (Reddit discussion.)

Maybe try adding

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

to your config as mentioned here.

  • OK, this worked. Not very familiar with Elpa but it seems strange that the issues in the Reddit post occurred a month ago and it still hasn't been resolved. Commented Aug 17, 2019 at 0:43

Your Answer

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

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