2013-10-21 136 views
1

當我做M-x package-install <ret> dsvn <ret>,我得到一個錯誤類型參數錯誤。這從最近的Emacs軟件包更新開始。我無法弄清楚。軟件包安裝錯誤類型參數錯誤

[=========]

Debugger entered--Lisp error: (wrong-type-argument stringp nil) 
string-match("\\`https?:" nil) 
package-download-single(dsvn "20130120.1457" "Subversion interface [svn]" nil) 
package-download-transaction((dsvn)) 
package-install(dsvn) 
ad-Orig-call-interactively(package-install record nil) 
call-interactively(package-install record nil) 
command-execute(package-install record) 
smex-read-and-run(("package-install" "package-list-packages" "fringe-mode" "eval-buffer" "ansi-term" "scroll-bar-mode" "list-faces-display" "customize-variable" "delete-trailing-whitespace" "compile" "comint-run" "emacs-lisp-mode" "comint-mode" "toggle-read-only" "message-mode" "end-of-buffer" "helm-end-of-buffer" "cua-paste" "cua-cut-region" "elscreen-toggle" "ergoemacs-mode" "previous-buffer" "doremi-buffers+" "delete-file" "show-smartparens-mode" "show-paren-mode" "server-start" "python-mode" "projectile-mode" "indent-region" "eval-expression" "key-combo-mode" "emacs-init-time" "byte-recompile-directory" "doremi-all-faces-fg+" "irc" "golden-ratio-mode" "menu-bar-select-buffer" "menu-bar-open" "doremi-global-marks+" "doremi-window-width+" "beginning-of-buffer" "finder-by-keyword" "subword-mode" "fastnav-jump-to-char-forward" "fastnav-sprint-forward" "describe-bindings" "helm-find-files" "helm-for-files" "helm-ack" ...)) 
ad-Orig-smex() 
smex() 
(lambda nil (interactive) (or (boundp (quote smex-cache)) (smex-initialize)) (global-set-key (kbd "M-x") (quote smex)) (smex))() 
ad-Orig-call-interactively((lambda nil (interactive) (or (boundp (quote smex-cache)) (smex-initialize)) (global-set-key (kbd "M-x") (quote smex)) (smex)) nil nil) 
call-interactively((lambda nil (interactive) (or (boundp (quote smex-cache)) (smex-initialize)) (global-set-key (kbd "M-x") (quote smex)) (smex)) nil nil) 

編輯:我沒有改變任何東西,現在的包,甚至沒有列出。

+0

請參閱https://github.com/cask/epl/issues/7。這是同一個問題嗎? – lunaryorn

回答

1

添加到您的Emacs init

(setq package-archives '(("gnu" . "http://elpa.gnu.org/packages/") 
      ("marmalade" . "http://marmalade-repo.org/packages/") 
      ("melpa" . "http://melpa.milkbox.net/packages/"))) 

或者C-:進入上面的代碼片段

然後M-Xpackage-refresh-contents

並嘗試做你上面都表示什麼。

更容易的方式似乎是:M-xlist-packages

+0

這不能解決問題。出於某種原因,即使'package-archives'設置在我的'init'中,當我在list-packages緩衝區中評估它時,它就是'nil'。設置它並沒有幫助。 :( – PythonNut

+1

好的,在設置變量後做第二個package-list-packages解決了這個問題,我可以通過將聲明移到我的init的底部來使其成爲永久的。 – PythonNut

+0

確保URL以正斜槓結尾。在下載軟件包內容時,emacs只是附加到URL而不檢查用戶是否包含該斜槓,從而導致錯誤。 – Rahs