【已解决】Win10下安装求助:Could not create connection to github.com:443

安装后第一次启动,终于到达了spacemacs的欢迎界面,而且空格键也能呼出菜单,但下方出现如此提示:

Errors:
    - Error: Cannot find gzip executable in you PATH. Download and install gzip here:
      http://gnuwin32.sourceforge.net/packages/gzip.htm spacelpa installation has been
      skipped!

之后我按照提示,下载并安装gzip,并将安装目录加入Path变量,之后就出现如下提示

Debugger entered--Lisp error: (error "Could not create connection to github.com:443")
  signal(error ("Could not create connection to github.com:443"))
  error("Could not create connection to %s:%d" "github.com" 443)
  url-http([cl-struct-url "https" nil nil "github.com" nil "/syl20bnr/spacelpa/archive/v0.300.tar.gz" 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) nil tls)
  url-https([cl-struct-url "https" nil nil "github.com" nil "/syl20bnr/spacelpa/archive/v0.300.tar.gz" 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://github.com/syl20bnr/spacelpa/archive/v0.300.tar.gz" #[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://github.com/syl20bnr/spacelpa/archive/v0.300.tar.gz" #[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://github.com/syl20bnr/spacelpa/archive/v0.300.tar.gz")
  url-copy-file("https://github.com/syl20bnr/spacelpa/archive/v0.300.tar.gz" "c:/Users/glass/AppData/Roaming/.emacs.d/.cache/stable-elpa/25.3.1/spacelpa-0.300.tar.gz" ok-if-already-exists)
  (if (and (spacemacs/system-is-mswindows) (not (executable-find "gzip"))) (progn (configuration-layer//error (format (concat "Error: Cannot find gzip executable in you PATH.\n" "Download and install gzip here: " "http://gnuwin32.sourceforge.net/packages/gzip.htm \n" "%s installation has been skipped!") name))) (make-directory configuration-layer-stable-elpa-directory t) (url-copy-file url local (quote ok-if-already-exists)) (if dotspacemacs-verify-spacelpa-archives (progn (url-copy-file url-sig local-sig (quote ok-if-already-exists)))) (if (configuration-layer//stable-elpa-untar-archive) (progn (delete-file local) (if dotspacemacs-verify-spacelpa-archives (progn (delete-file local-sig))) (save-current-buffer (set-buffer (find-file-noselect configuration-layer--stable-elpa-version-file)) (erase-buffer) (beginning-of-buffer) (insert (format "%s" configuration-layer-stable-elpa-version)) (save-buffer)))))
  (let ((url (configuration-layer//stable-elpa-tarball-distant-file)) (local (configuration-layer//stable-elpa-tarball-local-file)) (url-sig (configuration-layer//stable-elpa-tarball-distant-sign-file)) (local-sig (configuration-layer//stable-elpa-tarball-local-sign-file)) (name configuration-layer-stable-elpa-name)) (spacemacs-buffer/set-mode-line (format (concat "Downloading stable ELPA repository: %s... " "(please wait)") name) t) (if (and (spacemacs/system-is-mswindows) (not (executable-find "gzip"))) (progn (configuration-layer//error (format (concat "Error: Cannot find gzip executable in you PATH.\n" "Download and install gzip here: " "http://gnuwin32.sourceforge.net/packages/gzip.htm \n" "%s installation has been skipped!") name))) (make-directory configuration-layer-stable-elpa-directory t) (url-copy-file url local (quote ok-if-already-exists)) (if dotspacemacs-verify-spacelpa-archives (progn (url-copy-file url-sig local-sig (quote ok-if-already-exists)))) (if (configuration-layer//stable-elpa-untar-archive) (progn (delete-file local) (if dotspacemacs-verify-spacelpa-archives (progn (delete-file local-sig))) (save-current-buffer (set-buffer (find-file-noselect configuration-layer--stable-elpa-version-file)) (erase-buffer) (beginning-of-buffer) (insert (format "%s" configuration-layer-stable-elpa-version)) (save-buffer))))))
  (progn (let ((url (configuration-layer//stable-elpa-tarball-distant-file)) (local (configuration-layer//stable-elpa-tarball-local-file)) (url-sig (configuration-layer//stable-elpa-tarball-distant-sign-file)) (local-sig (configuration-layer//stable-elpa-tarball-local-sign-file)) (name configuration-layer-stable-elpa-name)) (spacemacs-buffer/set-mode-line (format (concat "Downloading stable ELPA repository: %s... " "(please wait)") name) t) (if (and (spacemacs/system-is-mswindows) (not (executable-find "gzip"))) (progn (configuration-layer//error (format (concat "Error: Cannot find gzip executable in you PATH.\n" "Download and install gzip here: " "http://gnuwin32.sourceforge.net/packages/gzip.htm \n" "%s installation has been skipped!") name))) (make-directory configuration-layer-stable-elpa-directory t) (url-copy-file url local (quote ok-if-already-exists)) (if dotspacemacs-verify-spacelpa-archives (progn (url-copy-file url-sig local-sig (quote ok-if-already-exists)))) (if (configuration-layer//stable-elpa-untar-archive) (progn (delete-file local) (if dotspacemacs-verify-spacelpa-archives (progn (delete-file local-sig))) (save-current-buffer (set-buffer (find-file-noselect configuration-layer--stable-elpa-version-file)) (erase-buffer) (beginning-of-buffer) (insert (format "%s" configuration-layer-stable-elpa-version)) (save-buffer)))))))
  (if (and (assoc configuration-layer-stable-elpa-name configuration-layer-elpa-archives) (not (string-equal (configuration-layer/stable-elpa-version) configuration-layer-stable-elpa-version))) (progn (let ((url (configuration-layer//stable-elpa-tarball-distant-file)) (local (configuration-layer//stable-elpa-tarball-local-file)) (url-sig (configuration-layer//stable-elpa-tarball-distant-sign-file)) (local-sig (configuration-layer//stable-elpa-tarball-local-sign-file)) (name configuration-layer-stable-elpa-name)) (spacemacs-buffer/set-mode-line (format (concat "Downloading stable ELPA repository: %s... " "(please wait)") name) t) (if (and (spacemacs/system-is-mswindows) (not (executable-find "gzip"))) (progn (configuration-layer//error (format (concat "Error: Cannot find gzip executable in you PATH.\n" "Download and install gzip here: " "http://gnuwin32.sourceforge.net/packages/gzip.htm \n" "%s installation has been skipped!") name))) (make-directory configuration-layer-stable-elpa-directory t) (url-copy-file url local (quote ok-if-already-exists)) (if dotspacemacs-verify-spacelpa-archives (progn (url-copy-file url-sig local-sig (quote ok-if-already-exists)))) (if (configuration-layer//stable-elpa-untar-archive) (progn (delete-file local) (if dotspacemacs-verify-spacelpa-archives (progn ...)) (save-current-buffer (set-buffer ...) (erase-buffer) (beginning-of-buffer) (insert ...) (save-buffer))))))))
  configuration-layer/stable-elpa-download-tarball()
  (if (not (version<= spacemacs-emacs-min-version emacs-version)) (error (concat "Your version of Emacs (%s) is too old. " "Spacemacs requires Emacs version %s or above.") emacs-version spacemacs-emacs-min-version) (load-file (concat (file-name-directory load-file-name) "core/core-load-paths.el")) (require (quote core-spacemacs)) (configuration-layer/load-lock-file) (spacemacs/init) (configuration-layer/stable-elpa-download-tarball) (configuration-layer/load) (spacemacs-buffer/display-startup-note) (spacemacs/setup-startup-hook) (require (quote server)) (if (server-running-p) nil (server-start)))
  eval-buffer(#<buffer  *load*> nil "c:/Users/glass/AppData/Roaming/.emacs.d/init.el" nil t)  ; Reading at buffer position 1356
  load-with-code-conversion("c:/Users/glass/AppData/Roaming/.emacs.d/init.el" "c:/Users/glass/AppData/Roaming/.emacs.d/init.el" t t)
  load("c:/Users/glass/AppData/Roaming/.emacs.d/init" t t)
  #[0 "\205\266

经过百度后,我下载了gnutls-3.4.15-w32-bin.zip,并将压缩包bin目录中的所有dll文件拷贝至EMACS安装目录下的bin目录中,之后重启EMACS,依然有以上提示。

PS:网络环境应该是可以的,用macbook不挂代理安装,并无以上提示。

解决方法:
基本思路是引GnuTLS的库文件或者Emacs官方的。 方法一:
GnuTLS官网 → Download → GnuTLS for Windows → 下载最新版压缩包 → 将包中bin目录下dll解压至emacs.exe所在目录 → 重启emacs


方法二:
Emacs官网 → Download → 找到 Windows → nearby GNU mirror → 搜索deps,下载最新版压缩包(这次我下载的是emacs-25-x86_64-deps.zip) → 将包中bin目录下dll解压至emacs.exe所在目录 → 重启emacs
PS:现在想想,这个下载的emacs应该可以直接使用,我很残地选择了转移dll。。。

我建议选择方法二,也就是引官方提供的库文件,因为可以正常显示图标。另外值得注意的是,我使用的不是 Emacs-26 的包,而是正常下载目录中的有deps的包。

时间允许的话,希望后来的同学能完整阅读下方的回复,也许能有额外的收货。

1 个赞

直接下有deps的试试。

1 个赞

gnutls所在的文件夹在path里面了吗?

在ftp://ftp.gnutls.org/gcrypt/gnutls/w32/ 下载最新版的The GnuTLS Transport Layer Security Library, 将bin目录下文件全部解压出来,放在emacs\bin 目录下可解决。emacs 启动时的"gnutls.c:[1] (Emacs) GnuTSL libarary not found"也一并消除。

1 个赞

同样遇到这个问题,求解答

试过下载gnutls exe了么?或者openssl也行。我的spacemacs里:

tls-program is a variable defined in `tls.el'.
Its value is

("gnutls-cli --x509cafile %t -p %p %h" "gnutls-cli --x509cafile %t -p %p %h
--protocols ssl3" "openssl s_client -connect %h:%p -no_ssl2 -ign_eof")

下载了,gnutls的bin也加到path里面了,不过还是报错

我刚更新完也是这个问题,但是我重启了几次就好了.重启emacs.还有我用的7z的压缩软件.

google了半天也没找到解决办法,果然windows上还是有点蛋疼,主要不清楚什么原因导致的,mac上就没这么多问题。

这里,这个链接上面写了应该是缺什么dll,我就下载了emacs-26.0.90-x86_64.zip把bin里面的dll都复制到了我的emacs的bin文件夹里面,就好了,这个里面dll很多,我也不知道具体哪个有用,复制完重启的时候会卡一会儿,你们试试看有没有用,我这里是好了。

2 个赞

我希望能发布个完善的答案,所以Emacs-26 的链接引自哪个页面,还请告知,谢谢。我在官网上找了一下,可能由于不够仔细+英文超烂,没有找到 @clloz @sujikinen

就是这个页面,我下的是emacs-26.0.90-x86_64.zip,出处就是这个问题的答案里面,我是直接从这个问题下面的链接进去的。