错误的类型参数:stringp、nil - slime 安装
Wrong type argument: stringp, nil - slime installation
我正在尝试按照 Slime GitHub 页面中的快速安装在 GNU Emacs 中安装和设置 SLIME。 https://github.com/slime/slime
我已经按照设置 MELPA 存储库 link 中的说明进行操作,这需要您将代码添加到您的 .emacs 文件中。以下是我的 .emacs 文件中的代码:
;; Added by Package.el. This must come before configurations of
;; installed packages. Don't delete this line. If you don't want it,
;; just comment it out by adding a semicolon to the start of the line.
;; You may delete these explanatory comments.
(require 'package)
(let* ((no-ssl (and (memq system-type '(windows-nt ms-dos))
(not (gnutls-available-p))))
(proto (if no-ssl "http" "https")))
;; Comment/uncomment these two lines to enable/disable MELPA and MELPA Stable as desired
(add-to-list 'package-archives (cons "melpa" (concat proto "://melpa.org/packages/")) t)
;;(add-to-list 'package-archives (cons "melpa-stable" (concat proto "://stable.melpa.org/packages/")) t)
(when (< emacs-major-version 24)
;; For important compatibility libraries like cl-lib
(add-to-list 'package-archives '("gnu" . (concat proto "://elpa.gnu.org/packages/")))))
(package-initialize)
;; Set your lisp system and, optionally, some contribs
(setq inferior-lisp-program "/opt/sbcl/bin/sbcl")
(setq slime-contribs '(slime-fancy))
(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.
'(ansi-color-faces-vector
[default default default italic underline success warning error])
'(ansi-color-names-vector
["#073642" "#dc322f" "#859900" "#b58900" "#268bd2" "#d33682" "#2aa198" "#657b83"])
'(compilation-message-face (quote default))
'(cua-global-mark-cursor-color "#2aa198")
'(cua-normal-cursor-color "#839496")
'(cua-overwrite-cursor-color "#b58900")
'(cua-read-only-cursor-color "#859900")
'(custom-enabled-themes (quote (deeper-blue)))
'(custom-safe-themes
(quote
("8aebf25556399b58091e533e455dd50a6a9cba958cc4ebb0aab175863c25b9a4" default)))
'(fci-rule-color "#073642")
'(highlight-changes-colors (quote ("#d33682" "#6c71c4")))
'(highlight-symbol-colors
(--map
(solarized-color-blend it "#002b36" 0.25)
(quote
("#b58900" "#2aa198" "#dc322f" "#6c71c4" "#859900" "#cb4b16" "#268bd2"))))
'(highlight-symbol-foreground-color "#93a1a1")
'(highlight-tail-colors
(quote
(("#073642" . 0)
("#546E00" . 20)
("#00736F" . 30)
("#00629D" . 50)
("#7B6000" . 60)
("#8B2C02" . 70)
("#93115C" . 85)
("#073642" . 100))))
'(hl-bg-colors
(quote
("#7B6000" "#8B2C02" "#990A1B" "#93115C" "#3F4D91" "#00629D" "#00736F" "#546E00")))
'(hl-fg-colors
(quote
("#002b36" "#002b36" "#002b36" "#002b36" "#002b36" "#002b36" "#002b36" "#002b36")))
'(magit-diff-use-overlays nil)
'(package-archives (quote (("gnu" . "http://elpa.gnu.org/packages/"))))
'(package-selected-packages (quote (slime solarized-theme)))
'(pos-tip-background-color "#073642")
'(pos-tip-foreground-color "#93a1a1")
'(smartrep-mode-line-active-bg (solarized-color-blend "#859900" "#073642" 0.2))
'(term-default-bg-color "#002b36")
'(term-default-fg-color "#839496")
'(vc-annotate-background nil)
'(vc-annotate-color-map
(quote
((20 . "#dc322f")
(40 . "#c85d17")
(60 . "#be730b")
(80 . "#b58900")
(100 . "#a58e00")
(120 . "#9d9100")
(140 . "#959300")
(160 . "#8d9600")
(180 . "#859900")
(200 . "#669b32")
(220 . "#579d4c")
(240 . "#489e65")
(260 . "#399f7e")
(280 . "#2aa198")
(300 . "#2898af")
(320 . "#2793ba")
(340 . "#268fc6")
(360 . "#268bd2"))))
'(vc-annotate-very-old-color nil)
'(weechat-color-list
(quote
(unspecified "#002b36" "#073642" "#990A1B" "#dc322f" "#546E00" "#859900" "#7B6000" "#b58900" "#00629D" "#268bd2" "#93115C" "#d33682" "#00736F" "#2aa198" "#839496" "#657b83"))))
(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.
)
接下来,我 运行 根据 GitHub 页面执行以下命令并尝试下载 SLIME:
M-x package-install RET slime RET
当我执行上述命令时,出现以下错误:
参数类型错误:stringp、nil
有谁知道我为什么会收到该错误或如何解决该问题?我正在 运行ning GNU Emacs 25.2.2(x86_64-pc-linux-gnu,GTK+ 版本 3.22.21)
OS 是 Ubuntu 18.04.1 LTS。任何帮助将不胜感激。
编辑:添加回溯 -
Debugger entered--Lisp error: (wrong-type-argument stringp nil)
string-match("\`https?:" nil nil)
package-install-from-archive([cl-struct-package-desc slime (2 22) "Superior Lisp Interaction Mode for Emacs" ((cl-lib (0 5)) (macrostep (0 9))) tar "melpa" nil ((:commit . "8d9fdf34fe542ec280ee042ee7bdea16e512d3c0") (:keywords "languages" "lisp" "slime") (:url . "https://github.com/slime/slime")) nil])
mapc(package-install-from-archive ([cl-struct-package-desc slime (2 22) "Superior Lisp Interaction Mode for Emacs" ((cl-lib (0 5)) (macrostep (0 9))) tar "melpa" nil ((:commit . "8d9fdf34fe542ec280ee042ee7bdea16e512d3c0") (:keywords "languages" "lisp" "slime") (:url . "https://github.com/slime/slime")) nil]))
package-download-transaction(([cl-struct-package-desc slime (2 22) "Superior Lisp Interaction Mode for Emacs" ((cl-lib (0 5)) (macrostep (0 9))) tar "melpa" nil ((:commit . "8d9fdf34fe542ec280ee042ee7bdea16e512d3c0") (:keywords "languages" "lisp" "slime") (:url . "https://github.com/slime/slime")) nil]))
package-install(slime nil)
funcall-interactively(package-install slime nil)
call-interactively(package-install record nil)
command-execute(package-install record)
execute-extended-command(nil "package-install" "package-install")
funcall-interactively(execute-extended-command nil "package-install" "package-install")
call-interactively(execute-extended-command nil nil)
command-execute(execute-extended-command)
我在安装不同的包时发生了类似的事情。 M-x package-refresh-contents
修复了它。每次重新启动并尝试安装软件包后,您可能都必须 运行 执行此操作。
我正在尝试按照 Slime GitHub 页面中的快速安装在 GNU Emacs 中安装和设置 SLIME。 https://github.com/slime/slime
我已经按照设置 MELPA 存储库 link 中的说明进行操作,这需要您将代码添加到您的 .emacs 文件中。以下是我的 .emacs 文件中的代码:
;; Added by Package.el. This must come before configurations of
;; installed packages. Don't delete this line. If you don't want it,
;; just comment it out by adding a semicolon to the start of the line.
;; You may delete these explanatory comments.
(require 'package)
(let* ((no-ssl (and (memq system-type '(windows-nt ms-dos))
(not (gnutls-available-p))))
(proto (if no-ssl "http" "https")))
;; Comment/uncomment these two lines to enable/disable MELPA and MELPA Stable as desired
(add-to-list 'package-archives (cons "melpa" (concat proto "://melpa.org/packages/")) t)
;;(add-to-list 'package-archives (cons "melpa-stable" (concat proto "://stable.melpa.org/packages/")) t)
(when (< emacs-major-version 24)
;; For important compatibility libraries like cl-lib
(add-to-list 'package-archives '("gnu" . (concat proto "://elpa.gnu.org/packages/")))))
(package-initialize)
;; Set your lisp system and, optionally, some contribs
(setq inferior-lisp-program "/opt/sbcl/bin/sbcl")
(setq slime-contribs '(slime-fancy))
(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.
'(ansi-color-faces-vector
[default default default italic underline success warning error])
'(ansi-color-names-vector
["#073642" "#dc322f" "#859900" "#b58900" "#268bd2" "#d33682" "#2aa198" "#657b83"])
'(compilation-message-face (quote default))
'(cua-global-mark-cursor-color "#2aa198")
'(cua-normal-cursor-color "#839496")
'(cua-overwrite-cursor-color "#b58900")
'(cua-read-only-cursor-color "#859900")
'(custom-enabled-themes (quote (deeper-blue)))
'(custom-safe-themes
(quote
("8aebf25556399b58091e533e455dd50a6a9cba958cc4ebb0aab175863c25b9a4" default)))
'(fci-rule-color "#073642")
'(highlight-changes-colors (quote ("#d33682" "#6c71c4")))
'(highlight-symbol-colors
(--map
(solarized-color-blend it "#002b36" 0.25)
(quote
("#b58900" "#2aa198" "#dc322f" "#6c71c4" "#859900" "#cb4b16" "#268bd2"))))
'(highlight-symbol-foreground-color "#93a1a1")
'(highlight-tail-colors
(quote
(("#073642" . 0)
("#546E00" . 20)
("#00736F" . 30)
("#00629D" . 50)
("#7B6000" . 60)
("#8B2C02" . 70)
("#93115C" . 85)
("#073642" . 100))))
'(hl-bg-colors
(quote
("#7B6000" "#8B2C02" "#990A1B" "#93115C" "#3F4D91" "#00629D" "#00736F" "#546E00")))
'(hl-fg-colors
(quote
("#002b36" "#002b36" "#002b36" "#002b36" "#002b36" "#002b36" "#002b36" "#002b36")))
'(magit-diff-use-overlays nil)
'(package-archives (quote (("gnu" . "http://elpa.gnu.org/packages/"))))
'(package-selected-packages (quote (slime solarized-theme)))
'(pos-tip-background-color "#073642")
'(pos-tip-foreground-color "#93a1a1")
'(smartrep-mode-line-active-bg (solarized-color-blend "#859900" "#073642" 0.2))
'(term-default-bg-color "#002b36")
'(term-default-fg-color "#839496")
'(vc-annotate-background nil)
'(vc-annotate-color-map
(quote
((20 . "#dc322f")
(40 . "#c85d17")
(60 . "#be730b")
(80 . "#b58900")
(100 . "#a58e00")
(120 . "#9d9100")
(140 . "#959300")
(160 . "#8d9600")
(180 . "#859900")
(200 . "#669b32")
(220 . "#579d4c")
(240 . "#489e65")
(260 . "#399f7e")
(280 . "#2aa198")
(300 . "#2898af")
(320 . "#2793ba")
(340 . "#268fc6")
(360 . "#268bd2"))))
'(vc-annotate-very-old-color nil)
'(weechat-color-list
(quote
(unspecified "#002b36" "#073642" "#990A1B" "#dc322f" "#546E00" "#859900" "#7B6000" "#b58900" "#00629D" "#268bd2" "#93115C" "#d33682" "#00736F" "#2aa198" "#839496" "#657b83"))))
(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.
)
接下来,我 运行 根据 GitHub 页面执行以下命令并尝试下载 SLIME:
M-x package-install RET slime RET
当我执行上述命令时,出现以下错误:
参数类型错误:stringp、nil
有谁知道我为什么会收到该错误或如何解决该问题?我正在 运行ning GNU Emacs 25.2.2(x86_64-pc-linux-gnu,GTK+ 版本 3.22.21) OS 是 Ubuntu 18.04.1 LTS。任何帮助将不胜感激。
编辑:添加回溯 -
Debugger entered--Lisp error: (wrong-type-argument stringp nil)
string-match("\`https?:" nil nil)
package-install-from-archive([cl-struct-package-desc slime (2 22) "Superior Lisp Interaction Mode for Emacs" ((cl-lib (0 5)) (macrostep (0 9))) tar "melpa" nil ((:commit . "8d9fdf34fe542ec280ee042ee7bdea16e512d3c0") (:keywords "languages" "lisp" "slime") (:url . "https://github.com/slime/slime")) nil])
mapc(package-install-from-archive ([cl-struct-package-desc slime (2 22) "Superior Lisp Interaction Mode for Emacs" ((cl-lib (0 5)) (macrostep (0 9))) tar "melpa" nil ((:commit . "8d9fdf34fe542ec280ee042ee7bdea16e512d3c0") (:keywords "languages" "lisp" "slime") (:url . "https://github.com/slime/slime")) nil]))
package-download-transaction(([cl-struct-package-desc slime (2 22) "Superior Lisp Interaction Mode for Emacs" ((cl-lib (0 5)) (macrostep (0 9))) tar "melpa" nil ((:commit . "8d9fdf34fe542ec280ee042ee7bdea16e512d3c0") (:keywords "languages" "lisp" "slime") (:url . "https://github.com/slime/slime")) nil]))
package-install(slime nil)
funcall-interactively(package-install slime nil)
call-interactively(package-install record nil)
command-execute(package-install record)
execute-extended-command(nil "package-install" "package-install")
funcall-interactively(execute-extended-command nil "package-install" "package-install")
call-interactively(execute-extended-command nil nil)
command-execute(execute-extended-command)
我在安装不同的包时发生了类似的事情。 M-x package-refresh-contents
修复了它。每次重新启动并尝试安装软件包后,您可能都必须 运行 执行此操作。