slime在emacs中启动错误,问题显示为“Socket error in "bind": 99 [已解决]

Vim、Emacs配置和使用
回复
头像
lwaterl
帖子: 379
注册时间: 2007-08-24 17:46

slime在emacs中启动错误,问题显示为“Socket error in "bind": 99 [已解决]

#1

帖子 lwaterl » 2012-03-07 22:17

系统为Debian(squeeze)
======
问题显示为“Socket error in "bind": 99 (无法指定被请求的地址)”

代码: 全选

sudo aptitude install emacs slime sbcl
在emacs中启用slime:M_x slime,得到如下输出
(progn (load "/usr/share/common-lisp/source/slime/swank-loader.lisp" :verbose t) (funcall (read-from-string "swank-loader:init")) (funcall (read-from-string "swank:start-server") "/tmp/slime.7734" :coding-system "iso-latin-1-unix"))

This is SBCL 1.0.40.0.debian, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/>.

SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses. See the CREDITS and COPYING files in the
distribution for more information.
*
; loading #P"/usr/share/common-lisp/source/slime/swank-loader.lisp"
; loading #P"/home/用户名/.cache/common-lisp/sbcl-1.0.40.0.debian-linux-x86/usr/share/common-lisp/source/slime/swank/fasl/sbcl-1.0.40.0.debian-linux-x86/swank-backend.fasl"
; loading #P"/home/用户名/.cache/common-lisp/sbcl-1.0.40.0.debian-linux-x86/usr/share/common-lisp/source/slime/swank/fasl/sbcl-1.0.40.0.debian-linux-x86/swank-source-path-parser.fasl"
; loading #P"/home/用户名/.cache/common-lisp/sbcl-1.0.40.0.debian-linux-x86/usr/share/common-lisp/source/slime/swank/fasl/sbcl-1.0.40.0.debian-linux-x86/swank-source-file-cache.fasl"
; loading #P"/home/用户名/.cache/common-lisp/sbcl-1.0.40.0.debian-linux-x86/usr/share/common-lisp/source/slime/swank/fasl/sbcl-1.0.40.0.debian-linux-x86/swank-sbcl.fasl"
STYLE-WARNING: redefining SOCKET-FD in DEFUN
STYLE-WARNING: redefining EMACS-INSPECT (#<BUILT-IN-CLASS T>) in DEFMETHOD
; loading #P"/home/用户名/.cache/common-lisp/sbcl-1.0.40.0.debian-linux-x86/usr/share/common-lisp/source/slime/swank/fasl/sbcl-1.0.40.0.debian-linux-x86/swank-gray.fasl"
STYLE-WARNING:
Implicitly creating new generic function STREAM-READ-CHAR-WILL-HANG-P.
; loading #P"/home/用户名/.cache/common-lisp/sbcl-1.0.40.0.debian-linux-x86/usr/share/common-lisp/source/slime/swank/fasl/sbcl-1.0.40.0.debian-linux-x86/swank-match.fasl"
; loading #P"/home/用户名/.cache/common-lisp/sbcl-1.0.40.0.debian-linux-x86/usr/share/common-lisp/source/slime/swank/fasl/sbcl-1.0.40.0.debian-linux-x86/swank-rpc.fasl"
; loading #P"/home/用户名/.cache/common-lisp/sbcl-1.0.40.0.debian-linux-x86/usr/share/common-lisp/source/slime/swank/fasl/sbcl-1.0.40.0.debian-linux-x86/swank.fasl"
WARNING: These Swank interfaces are unimplemented:
(DISASSEMBLE-FRAME DUP EXEC-IMAGE MAKE-FD-STREAM SLDB-BREAK-AT-START
SLDB-BREAK-ON-RETURN SOCKET-FD)

debugger invoked on a SB-BSD-SOCKETS:SOCKET-ERROR in thread #<THREAD
"initial thread" RUNNING
{AAE5739}>:
Socket error in "bind": 99 (无法指定被请求的地址)

Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
0: [ABORT] Exit debugger, returning to top level.

(SB-BSD-SOCKETS:SOCKET-ERROR "bind")
0] (quit)

Process inferior-lisp finished
这里是同时emacs的 *Message*
Loading 00debian-vars...done
Loading /etc/emacs/site-start.d/50autoconf.el (source)...done
Loading /etc/emacs/site-start.d/50git-core.el (source)...done
Loading /etc/emacs/site-start.d/50slime.el (source)...
Loading /usr/share/emacs23/site-lisp/slime/slime-autoloads.elc...done
Loading /etc/emacs/site-start.d/50slime.el (source)...done
For information about GNU Emacs and the GNU system, type C-h C-a.
Polling "/tmp/slime.7734".. (Abort with `M-x slime-abort-connection'.) [12 times]
byte-code: Beginning of buffer
Polling "/tmp/slime.7734".. (Abort with `M-x slime-abort-connection'.) [17 times]
byte-code: Beginning of buffer [4 times]
Polling "/tmp/slime.7734".. (Abort with `M-x slime-abort-connection'.) [5 times]
byte-code: Beginning of buffer [2 times]
Polling "/tmp/slime.7734".. (Abort with `M-x slime-abort-connection'.) [150 times]
Failed to connect to Swank: inferior process exited. ---------这里应该是,我退出后出现的
byte-code: Beginning of buffer [2 times]
记:虽已发了一个类似的贴子,但那个已经很乱,不知往哪里加,故这里又发了一个

====
这个问题是由于网卡没设置好,我没加入lo ,表现为“ping 127.0.0.1”不通,解决方法自然是把lo加上

代码: 全选

sudo emacs /etc/network/interfaces
在其中加入:
auto lo
iface lo inet loopback
回复