简体   繁体   English

无法下载melpa存档

[英]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 . 我正在使用emacs 24.5,并且试图将melpa存档添加到emacs中到我的package-archives中。 when i try Mx list-packages i get failed to download melpa archive and the list of packages of melpa repo doesn't appear. 当我尝试Mx list-packages无法下载melpa存档,并且melpa repo的软件包列表没有出现。 here is what i got when i try Mx toggle-debug-on-error 这是我尝试Mx 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 和我的.emacs文件

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

我已经找到问题所在了...要在emacs中下载melpa列表(emacs必须访问互联网),因此您必须包括库文件才能执行此操作...从此处下载gnutls-3.3.11-w32-bin https://sourceforge.net/projects/ezwinports/files/ ...提取下载的文件...并将.dll文件放入emacs文件夹中的bin文件中...希望您对我的小帮助感到满意:)

I had this problem. 我有这个问题。 It could be a $PATH issue. 可能是$ PATH问题。

I had the similar issue on Win7 and this answer from stackexchange helped me. 我对Win7的类似问题, 从stackexchange答案帮助了我。 In short words you have to download compiled Windows GnuTLS libraries and dependencies from here and unzip it to emacs folder. 简而言之,您必须从此处下载编译的Windows GnuTLS库和依赖项,并将其解压缩到emacs文件夹。 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 . 获取emacs-25-i686-deps.zip如果使用32-bit Windows和获得emacs-25-x86_64-deps.zip如果使用64-bit

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: 对我来说,由于我使用的是64位Emacs 25.2,因此必须从此处下载emacs-25-x86_64-deps.zip文件:

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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