简体   繁体   中英

Emacs 24.5 with prelude stuck on contacting host melpa.org

I'm running emacs 24.5 installed via homebrew. for some weird reason my emacs gets stuck on Contacting host: melpa.org:80

I even tried a fresh install of emacs (removed .emacs.d folder as well) Also i'm able to ping the url melpa.org through terminal.

Any ideas on how to fix this.

Can you try switching to HTTPS? I have

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

;; from https://glyph.twistedmatrix.com/2015/11/editor-malware.html
;; needs "brew install gnutls" and "pip install certifi", perhaps with sudo
(let ((trustfile
       (replace-regexp-in-string
        "\\\\" "/"
        (replace-regexp-in-string
         "\n" ""
         (shell-command-to-string "python -m certifi")))))
  (setq tls-program
        (list
         (format "/usr/local/bin/gnutls-cli --insecure --x509cafile %s -p %%p %%h"
                 trustfile)))
  (setq gnutls-verify-error t))

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM