Emacs不会列出任何软件包,也不会让我安装任何软件包

时间:2017-07-17 16:57:56

标签: emacs elisp emacs24 melpa

我一直在mac上设置我的emacs。我已经能够安装任何软件包甚至列出可用软件包,因为我已在此计算机上安装了emacs安装程序。每次我尝试刷新包存储库的内容时,都会收到以下错误并回溯:

Debugger entered--Lisp error: (wrong-type-argument listp <!DOCTYPE)
  package--read-archive-file("archives/marmalade/archive-contents")
  package-read-archive-contents("marmalade")
  package-read-all-archive-contents()
  package--update-downloads-in-progress(("melpa-stable" . "http://stable.melpa.org/packages/"))
  package--download-one-archive(("melpa-stable" . "http://stable.melpa.org/packages/") "archive-contents" nil)
  package--download-and-read-archives(nil)
  package-refresh-contents()
  funcall-interactively(package-refresh-contents)
  #<subr call-interactively>(package-refresh-contents record nil)
  ad-Advice-call-interactively(#<subr call-interactively> package-refresh-contents record nil)
  apply(ad-Advice-call-interactively #<subr call-interactively> (package-refresh-contents record nil))
  call-interactively(package-refresh-contents record nil)
  command-execute(package-refresh-contents record)
  execute-extended-command(nil "package-refresh-contents")
  smex-read-and-run(("pwd" "ido-wide-find-file-or-pop-dir" "bookmark-delete" "bookmark-jump" "bookmark-set" "replace-string" "flower-client-connect" "tramp-cleanup-connection" "rgrep" "tramp-cleanup-all-buffers" "tramp-cleanup-all-connections" "package-install" "magit-status" "flycheck-mode" "flycheck-set-checker-executable" "grep" "goto-line" "yank" "js2-mode" "grep-find" "rename-file" "magit-commit" "revert-buffer" "shrink-window" "clipboard-yank" "make-directory" "tramp-cleanup-this-connection" "5x5" "slime" "version" "php-mode" "web-mode" "irony-mode" "company-mode" "magit-rebase" "enlarge-window" "undo-tree-mode" "whitespace-mode" "package-initialize" "package-refresh-contents" "term" "imenu" "shell" "doctor" "eshell" "blackbox" "sgml-mode" "tern-mode" "tramp-bug" "calculator" ...))
  smex()
  funcall-interactively(smex)
  #<subr call-interactively>(smex nil nil)
  ad-Advice-call-interactively(#<subr call-interactively> smex nil nil)
  apply(ad-Advice-call-interactively #<subr call-interactively> (smex nil nil))
  call-interactively(smex nil nil)
  command-execute(smex)

以下是我用来初始化软件包存储库的代码。

;; Package Managers
(require 'package)
(package-initialize)
(add-to-list 'package-archives
         '("marmalade" . "http://marmalade-repo.com/packages/"))
(add-to-list 'package-archives
         '("melpa" . "http://melpa.org/packages/") t)
(add-to-list 'package-archives
         '("melpa-stable" . "http://stable.melpa.org/packages/") t)

还有其他人有这样的问题吗?如何从软件包存储库获得干净的响应,以便我可以安装软件包?

编辑:

我正在使用GNU Emacs版本25.1.1

1 个答案:

答案 0 :(得分:1)

问题是他们不是http://marmalade-repo.com/packages/。正确的网址是https://marmalade-repo.org/packages/

归功于@jenesaisquoi。该用户在我原始帖子的评论中找到了答案。

;; Package Managers
(require 'package)
(package-initialize)
(add-to-list 'package-archives
         '("marmalade" . "https://marmalade-repo.org/packages/"))
(add-to-list 'package-archives
         '("melpa" . "http://melpa.org/packages/") t)
(add-to-list 'package-archives
         '("melpa-stable" . "http://stable.melpa.org/packages/") t)