package-refresh-contents hangs at Contacting host: elpa.gnu.org:80

I had this same problem on emacs ELPA wiki they say to set un ELPA you have to modify the emacs init file located at ~/.emacs or _emacs or ~/.emacs.d/init.el for me it was ~/.emacs-live.el since I have this version.

I just updated that file with the following:

(setq package-archives '(("gnu" . "http://elpa.gnu.org/packages/")
                     ("marmalade" . "http://marmalade-repo.org/packages/")
                     ("melpa" . "http://melpa.org/packages/")))

Seems that I needed the configuration from where ELPA is going to look for packages.

After that i just ran M-x package-refresh-contents [RET] and M-x package-install [RET] cider [RET] that installed cider.



This guide fixed it for me: http://www.lonecpluspluscoder.com/2015/08/adding-tls-support-to-emacs-24-5-on-windows/

Basically go to: http://sourceforge.net/projects/ezwinports/files/, grab the gnutls library and just uncompress the archive at the root of your Emacs directory.

Afterwards, doing list-packages became near-instant for me. Using Emacs 24.5.1.


I had the same problem with Emacs 24 in Ubuntu 16.04 and nothing seemed to solve the problem. Finally, installing Emacs 25 solved the problem.

New Emacs packages are available here

sudo add-apt-repository ppa:kelleyk/emacs
sudo apt-get update
apt-get install emacs27

The problem is that the ELPA package signing key has expired. A new Emacs version will include a new key. Note that currently (2020 Oct) there is Emacs 27 available for Ubuntu 16.04.

Also make sure that you use https urls (and not plain http).

Another possibility may be to install new keys to an older Emacs version.

Windows binaries may also be available somewhere.