1

我正在使用 emacs 24.5,并且正在尝试将 melpa 存档添加到 emacs 到我的 package-archives 。当我尝试时,M-x list-packages无法下载 melpa 存档,并且没有出现 melpa repo 的软件包列表。这是我尝试时得到的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)

和我的.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.
 )
4

4 回答 4

1

我在 Win7 上遇到了类似的问题,StackExchange 的这个答案帮助了我。简而言之,您必须从这里下载已编译的 Windows GnuTLS 库和依赖项,并将其解压缩到 emacs 文件夹中。emacs-25-i686-deps.zip如果您使用32-bitWindows 则获取,emacs-25-x86_64-deps.zip如果您使用64-bit.

于 2017-10-13T21:00:16.540 回答
1

我已经找到问题的确切位置...在 emacs 中下载 melpa 列表(emacs 必须访问互联网),因此您必须包含库文件才能做到这一点...从此处下载gnutls-3.3.11-w32-binhttps://sourceforge.net/projects/ezwinports/files/ ...提取下载的文件...并将文件放在 emacs 文件夹中的.dll文件bin中...希望您对我的小帮助感到满意 :)

于 2016-05-05T13:23:25.697 回答
0

我有这个问题。这可能是 $PATH 问题。

于 2017-05-06T07:58:05.100 回答
0

对我来说,因为我使用的是 Emacs 25.2 64 位,所以我必须emacs-25-x86_64-deps.zip从这里下载文件:

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

于 2018-07-31T16:58:17.553 回答