failed to download melpa archive

mouhammed saieed picture mouhammed saieed · Apr 30, 2016 · Viewed 7.3k times · Source

I am using emacs 24.5 and i am trying to add the melpa archive to emacs to my package-archives . when i try M-x list-packages i get failed to download melpa archive and the list of packages of melpa repo doesn't appear. here is what i got when i try M-x toggle-debug-on-error

Debugger entered--Lisp error: (error "Could not create connection to melpa.org:443")
signal(error ("Could not create connection to melpa.org:443"))
error("Could not create connection to %s:%d" "melpa.org" 443)
url-http([cl-struct-url "https" nil nil "melpa.org" nil "/packages/archive-  contents" nil nil t nil t] #[128 "\302\303\304p#\210\300\305\240\210\301p\240\207" [(nil) (nil) url-debug retrieval "Synchronous fetching done (%S)" t] 5 "\n\n(fn &rest IGNORED)"] (nil))
url-https([cl-struct-url "https" nil nil "melpa.org" nil "/packages/archive-  contents" nil nil t nil t] #[128 "\302\303\304p#\210\300\305\240\210\301p\240\207" [(nil) (nil) url-debug retrieval "Synchronous fetching done (%S)" t] 5 "\n\n(fn &rest IGNORED)"] (nil))
url-retrieve-internal("https://melpa.org/packages/archive-contents" #[128 "\302\303\304p#\210\300\305\240\210\301p\240\207" [(nil) (nil) url-debug retrieval "Synchronous fetching done (%S)" t] 5 "\n\n(fn &rest IGNORED)"] (nil) nil nil)
url-retrieve("https://melpa.org/packages/archive-contents" #[128 "\302\303\304p#\210\300\305\240\210\301p\240\207" [(nil) (nil) url-debug retrieval "Synchronous fetching done (%S)" t] 5 "\n\n(fn &rest IGNORED)"] nil nil nil)
url-retrieve-synchronously("https://melpa.org/packages/archive-contents")
url-insert-file-contents("https://melpa.org/packages/archive-contents")
package--download-one-archive(("melpa" . "https://melpa.org/packages/") "archive-contents")
#[0 "\301\300\302\"\207" [("melpa" . "https://melpa.org/packages/")
package--download-one-archive "archive-contents"] 3 "\n\n(fn)"]()
funcall(#[0 "\301\300\302\"\207" [("melpa" . "https://melpa.org/packages/")   package--download-one-archive "archive-contents"] 3 "\n\n(fn)"])
package-refresh-contents()
list-packages(nil)
call-interactively(list-packages record nil)
command-execute(list-packages record)
execute-extended-command(nil "list-packages")
call-interactively(execute-extended-command nil nil)
command-execute(execute-extended-command)

and my .emacs file

(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
 '(package-archives
 (quote
(("gnu" . "http://elpa.gnu.org/packages/")
 ("melpa" . "https://melpa.org/packages/")))))
 (custom-set-faces
 ;; custom-set-faces was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 )

Answer

mouhammed saieed picture mouhammed saieed · May 5, 2016

i have found exactly where the problem is...to download the melpa list in emacs (emacs must access the internet) so you must include the library files to do that...download gnutls-3.3.11-w32-bin from here https://sourceforge.net/projects/ezwinports/files/ ... extract the downloaded file... and put the .dll files in bin file in emacs folder... hope you are happy with my little help :)