mouhammed saieed
mouhammed saieed

Reputation: 77

failed to download melpa archive

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.
 )

Upvotes: 1

Views: 8403

Answers (4)

Ovsyanka
Ovsyanka

Reputation: 418

I had a similar issue on Win7 and this answer from StackExchange helped me. In short, you have to download compiled Windows GnuTLS libraries and dependencies from here and unzip it to the emacs folder. Get emacs-25-i686-deps.zip if you use 32-bit Windows and get emacs-25-x86_64-deps.zip if you use 64-bit.

Upvotes: 1

user8128167
user8128167

Reputation: 7676

For me, since I was using Emacs 25.2 64-bit, I had to download the emacs-25-x86_64-deps.zip files from here:

https://ftp.gnu.org/gnu/emacs/windows/emacs-25/

Upvotes: 0

user2156711
user2156711

Reputation: 103

I had this problem. It could be a $PATH issue.

Upvotes: 0

mouhammed saieed
mouhammed saieed

Reputation: 77

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 :)

Upvotes: 1

Related Questions