在 WSL2 中安装 Quicklisp 时发生套接字错误
Socket error while installing Quicklisp in WSL2
与 Connection refused error installing quicklisp 类似,我在 WSL2 中安装 Quicklisp 时遇到此错误 :
* (quicklisp-quickstart:install)
debugger invoked on a SB-BSD-SOCKETS:OPERATION-TIMEOUT-ERROR in thread
#<THREAD "main thread" RUNNING {1000560083}>:
Socket error in "connect": ETIMEDOUT (Connection timed out)
因为我可以使用 wget 下载文件,而且我能够在同一台机器上的 a docker 容器中设置 Quicklisp,我相信这与WSL2如何处理网络有关。尽管如此,我无法确定一个代理,我可以在安装期间将其作为参数提供。
这是回溯:
Backtrace for: #<SB-THREAD:THREAD "main thread" RUNNING {1000560083}>
0: (SB-BSD-SOCKETS:SOCKET-ERROR "connect" 110)
1: (SB-BSD-SOCKETS::CALL-WITH-SOCKET-ADDR #<SB-BSD-SOCKETS:INET-SOCKET 0.0.0.0:34844, fd: 5 {10030B2293}> (#(205 251 195 105) 80) #<CLOSURE (FLET SB-BSD-SOCKETS::WITH-SOCKET-ADDR-THUNK :IN SB-BSD-SOCKETS:SOCKET-CONNECT) {7FF9E2E9733B}>)
2: ((:METHOD SB-BSD-SOCKETS:SOCKET-CONNECT (SB-BSD-SOCKETS:SOCKET)) #<SB-BSD-SOCKETS:INET-SOCKET 0.0.0.0:34844, fd: 5 {10030B2293}> #(205 251 195 105) 80) [fast-method]
3: ((:METHOD QLQS-NETWORK::%OPEN-CONNECTION (QLQS-IMPL:SBCL T T)) #<QLQS-IMPL:SBCL {1004DADD23}> "beta.quicklisp.org" 80) [fast-method]
4: ((:METHOD QLQS-NETWORK::%CALL-WITH-CONNECTION (T T T T)) #<QLQS-IMPL:SBCL {1004DADD23}> "beta.quicklisp.org" 80 #<CLOSURE (LAMBDA (QLQS-HTTP::CONNECTION) :IN QLQS-HTTP:FETCH) {10030B022B}>) [fast-method]
5: (QLQS-HTTP:FETCH #<QLQS-HTTP::URL "http://beta.quicklisp.org/client/quicklisp.sexp"> #P"/home/user/quicklisp/tmp/fetch.dat" :FOLLOW-REDIRECTS T :QUIETLY NIL :MAXIMUM-REDIRECTS NIL)
6: (QUICKLISP-QUICKSTART::RENAMING-FETCH "http://beta.quicklisp.org/client/quicklisp.sexp" #P"/home/user/quicklisp/tmp/client-info.sexp")
7: (QUICKLISP-QUICKSTART::FETCH-CLIENT-INFO-PLIST "http://beta.quicklisp.org/client/quicklisp.sexp")
8: (QUICKLISP-QUICKSTART::FETCH-CLIENT-INFO "http://beta.quicklisp.org/client/quicklisp.sexp")
9: (QUICKLISP-QUICKSTART::INITIAL-INSTALL :CLIENT-URL "http://beta.quicklisp.org/client/quicklisp.sexp" :DIST-URL NIL)
10: ((:METHOD QLQS-IMPL-UTIL::%CALL-WITH-QUIET-COMPILATION (T T)) #<QLQS-IMPL:SBCL {1004DADD23}> #<CLOSURE (LAMBDA NIL :IN QUICKLISP-QUICKSTART:INSTALL) {10030AD26B}>) [fast-method]
11: ((:METHOD QLQS-IMPL-UTIL::%CALL-WITH-QUIET-COMPILATION :AROUND (QLQS-IMPL:SBCL T)) #<QLQS-IMPL:SBCL {1004DADD23}> #<CLOSURE (LAMBDA NIL :IN QUICKLISP-QUICKSTART:INSTALL) {10030AD26B}>) [fast-method]
12: (QUICKLISP-QUICKSTART:INSTALL :PATH NIL :PROXY NIL :CLIENT-URL NIL :CLIENT-VERSION NIL :DIST-URL NIL :DIST-VERSION NIL)
13: (SB-INT:SIMPLE-EVAL-IN-LEXENV (QUICKLISP-QUICKSTART:INSTALL) #<NULL-LEXENV>)
14: (EVAL (QUICKLISP-QUICKSTART:INSTALL))
15: (INTERACTIVE-EVAL (QUICKLISP-QUICKSTART:INSTALL) :EVAL NIL)
16: (SB-IMPL::REPL-FUN NIL)
17: ((FLET "LAMBDA0" :IN "SYS:SRC;CODE;TOPLEVEL.LISP"))
18: (SB-IMPL::%WITH-REBOUND-IO-SYNTAX #<CLOSURE (FLET "LAMBDA0" :IN "SYS:SRC;CODE;TOPLEVEL.LISP") {7FF9E2E97B7B}>)
19: (SB-IMPL::TOPLEVEL-REPL NIL)
20: (SB-IMPL::TOPLEVEL-INIT)
21: ((FLET SB-UNIX::BODY :IN SAVE-LISP-AND-DIE))
22: ((FLET "WITHOUT-INTERRUPTS-BODY-14" :IN SAVE-LISP-AND-DIE))
23: ((LABELS SB-IMPL::RESTART-LISP :IN SAVE-LISP-AND-DIE))
我玩过这个,在我的情况下有效的解决方案是 运行 WSL2 中的 HTTP 代理,例如 https://mitmproxy.org
sudo pip3 install mitmproxy
mitmproxy
代理启动并 运行ning 后,必须按以下方式安装 Quicklist:
(quicklisp-quickstart:install :proxy "http://localhost:8080/")
与 Connection refused error installing quicklisp 类似,我在 WSL2 中安装 Quicklisp 时遇到此错误 :
* (quicklisp-quickstart:install)
debugger invoked on a SB-BSD-SOCKETS:OPERATION-TIMEOUT-ERROR in thread
#<THREAD "main thread" RUNNING {1000560083}>:
Socket error in "connect": ETIMEDOUT (Connection timed out)
因为我可以使用 wget 下载文件,而且我能够在同一台机器上的 a docker 容器中设置 Quicklisp,我相信这与WSL2如何处理网络有关。尽管如此,我无法确定一个代理,我可以在安装期间将其作为参数提供。
这是回溯:
Backtrace for: #<SB-THREAD:THREAD "main thread" RUNNING {1000560083}>
0: (SB-BSD-SOCKETS:SOCKET-ERROR "connect" 110)
1: (SB-BSD-SOCKETS::CALL-WITH-SOCKET-ADDR #<SB-BSD-SOCKETS:INET-SOCKET 0.0.0.0:34844, fd: 5 {10030B2293}> (#(205 251 195 105) 80) #<CLOSURE (FLET SB-BSD-SOCKETS::WITH-SOCKET-ADDR-THUNK :IN SB-BSD-SOCKETS:SOCKET-CONNECT) {7FF9E2E9733B}>)
2: ((:METHOD SB-BSD-SOCKETS:SOCKET-CONNECT (SB-BSD-SOCKETS:SOCKET)) #<SB-BSD-SOCKETS:INET-SOCKET 0.0.0.0:34844, fd: 5 {10030B2293}> #(205 251 195 105) 80) [fast-method]
3: ((:METHOD QLQS-NETWORK::%OPEN-CONNECTION (QLQS-IMPL:SBCL T T)) #<QLQS-IMPL:SBCL {1004DADD23}> "beta.quicklisp.org" 80) [fast-method]
4: ((:METHOD QLQS-NETWORK::%CALL-WITH-CONNECTION (T T T T)) #<QLQS-IMPL:SBCL {1004DADD23}> "beta.quicklisp.org" 80 #<CLOSURE (LAMBDA (QLQS-HTTP::CONNECTION) :IN QLQS-HTTP:FETCH) {10030B022B}>) [fast-method]
5: (QLQS-HTTP:FETCH #<QLQS-HTTP::URL "http://beta.quicklisp.org/client/quicklisp.sexp"> #P"/home/user/quicklisp/tmp/fetch.dat" :FOLLOW-REDIRECTS T :QUIETLY NIL :MAXIMUM-REDIRECTS NIL)
6: (QUICKLISP-QUICKSTART::RENAMING-FETCH "http://beta.quicklisp.org/client/quicklisp.sexp" #P"/home/user/quicklisp/tmp/client-info.sexp")
7: (QUICKLISP-QUICKSTART::FETCH-CLIENT-INFO-PLIST "http://beta.quicklisp.org/client/quicklisp.sexp")
8: (QUICKLISP-QUICKSTART::FETCH-CLIENT-INFO "http://beta.quicklisp.org/client/quicklisp.sexp")
9: (QUICKLISP-QUICKSTART::INITIAL-INSTALL :CLIENT-URL "http://beta.quicklisp.org/client/quicklisp.sexp" :DIST-URL NIL)
10: ((:METHOD QLQS-IMPL-UTIL::%CALL-WITH-QUIET-COMPILATION (T T)) #<QLQS-IMPL:SBCL {1004DADD23}> #<CLOSURE (LAMBDA NIL :IN QUICKLISP-QUICKSTART:INSTALL) {10030AD26B}>) [fast-method]
11: ((:METHOD QLQS-IMPL-UTIL::%CALL-WITH-QUIET-COMPILATION :AROUND (QLQS-IMPL:SBCL T)) #<QLQS-IMPL:SBCL {1004DADD23}> #<CLOSURE (LAMBDA NIL :IN QUICKLISP-QUICKSTART:INSTALL) {10030AD26B}>) [fast-method]
12: (QUICKLISP-QUICKSTART:INSTALL :PATH NIL :PROXY NIL :CLIENT-URL NIL :CLIENT-VERSION NIL :DIST-URL NIL :DIST-VERSION NIL)
13: (SB-INT:SIMPLE-EVAL-IN-LEXENV (QUICKLISP-QUICKSTART:INSTALL) #<NULL-LEXENV>)
14: (EVAL (QUICKLISP-QUICKSTART:INSTALL))
15: (INTERACTIVE-EVAL (QUICKLISP-QUICKSTART:INSTALL) :EVAL NIL)
16: (SB-IMPL::REPL-FUN NIL)
17: ((FLET "LAMBDA0" :IN "SYS:SRC;CODE;TOPLEVEL.LISP"))
18: (SB-IMPL::%WITH-REBOUND-IO-SYNTAX #<CLOSURE (FLET "LAMBDA0" :IN "SYS:SRC;CODE;TOPLEVEL.LISP") {7FF9E2E97B7B}>)
19: (SB-IMPL::TOPLEVEL-REPL NIL)
20: (SB-IMPL::TOPLEVEL-INIT)
21: ((FLET SB-UNIX::BODY :IN SAVE-LISP-AND-DIE))
22: ((FLET "WITHOUT-INTERRUPTS-BODY-14" :IN SAVE-LISP-AND-DIE))
23: ((LABELS SB-IMPL::RESTART-LISP :IN SAVE-LISP-AND-DIE))
我玩过这个,在我的情况下有效的解决方案是 运行 WSL2 中的 HTTP 代理,例如 https://mitmproxy.org
sudo pip3 install mitmproxy
mitmproxy
代理启动并 运行ning 后,必须按以下方式安装 Quicklist:
(quicklisp-quickstart:install :proxy "http://localhost:8080/")