Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

I'm running Emacs 24.4 for Windows (installed through Chocolatey) and trying to install CIDER.

When I run M-x package-install [RET] cider [RET], I get [No match]. When I run M-x package-refresh-contents [RET], it hangs on Contacting host: elpa.gnu.org:80.

~/.emacs.d is populated with the GitHub repo recommended by braveclojure.com (here). I've reinstalled Emacs and I'm still getting the same problem.

like image 676
Joshua Grosso Reinstate CMs Avatar asked Mar 16 '15 20:03

Joshua Grosso Reinstate CMs


2 Answers

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.


like image 151
AdnanJT Avatar answered Dec 12 '22 22:12

AdnanJT


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.

like image 25
dimitarvp Avatar answered Dec 12 '22 23:12

dimitarvp