ELPA/Marmalade 报告“无法打开加载文件”对于 ~/.emacs.d/elpa/archives/-pkg

发布于 2024-12-17 01:21:10 字数 2820 浏览 1 评论 0原文

我已经安装了 Marmalade 并下载了一些有趣的软件包。但是现在,当我启动 Emacs 时,我收到此错误:

Cannot open load file: c:/Documents and Settings/Carlos/Datos de programa/.emacs.d/elpa/archives/-pkg

如果我使用 --debug-init,我收到:

Debugger entered--Lisp error: (file-error "Cannot open load file" "c:/Documents and Settings/Carlos/Datos de programa/.emacs.d/elpa/archives/-pkg")
load("c:/Documents and Settings/Carlos/Datos de programa/.emacs.d/elpa/archives/-pkg" nil t)
(if (file-directory-p pkg-dir) (load (concat pkg-dir ... "-pkg") nil t))
(let ((pkg-dir ...)) (if (file-directory-p pkg-dir) (load ... nil t)))

package-load-descriptor("c:/Documents and Settings/Carlos/Datos de programa/.emacs.d/elpa/" "archives")
(lambda (name) (package-load-descriptor dir name))("archives")
mapc((lambda (name) (package-load-descriptor dir name)) ("anything-1.287" "anything-  complete-1.86" "anything-config-0.4.1" "archive-contents" "archive-contents~" "archives" "auto-indent-mode-0.35" "builtin-packages" "builtin-packages~" "clojure-mode-1.7.1" "clojurescript-mode-0.5" "coffee-mode-0.3.0" "color-file-completion-1.0.1" "color-theme-6.6.1" "color-theme-eclipse-0.0.2" "color-theme-github-0.0.3" "color-theme-railscasts-0.0.2" "color-theme-twilight-0.1" "css-mode-1.0" "drag-stuff-0.0.3" "evernote-mode-0.41" "find-file-in-project-2.0" "flymake-coffee-0.4" "flymake-haml-0.5" "flymake-ruby-0.4" "flymake-shell-0.5" "haml-mode-3.0.14" "highlight-parentheses-1.0.1" "html-script-src-0.0.2" "inf-ruby-2.1" "js-comint-0.0.1" "js2-mode-20090814" "lua-mode-20100617" "package.el" "package.el~" "project-local-variables-0.2" "ruby-compilation-0.7" "ruby-electric-1.1" "ruby-mode-1.1" "slime-20100404" "tabbar-2.0.1" "tabbar-ruler-0.2" "yasnippet-0.6.1" "yasnippet-bundle-0.6.1" "zenburn-1.8"))
(if (file-directory-p dir) (mapc (lambda ... ...) (directory-files dir nil "^[^.]")))
(lambda (dir) (if (file-directory-p dir) (mapc ... ...)))("c:/Documents and Settings/Carlos/Datos de programa/.emacs.d/elpa/")
mapc((lambda (dir) (if (file-directory-p dir) (mapc ... ...))) ("c:/Documents and Settings/Carlos/Datos de programa/.emacs.d/elpa/" "/usr/share/emacs/site-lisp/elpa/"))
package-load-all-descriptors()
package-initialize()
  (progn (package-initialize))
(if (load (expand-file-name "~/.emacs.d/elpa/package.el")) (progn (package-initialize)))
(when (load (expand-file-name "~/.emacs.d/elpa/package.el")) (package-initialize))
eval-buffer(#<buffer  *load*> nil "c:/Documents and Settings/Carlos/Datos de programa/.emacs" nil t)  ; Reading at buffer position 9019
load-with-code-conversion("c:/Documents and Settings/Carlos/Datos de programa/.emacs" "c:/Documents and Settings/Carlos/Datos de programa/.emacs" t t)
load("~/.emacs" t t)
#[nil "\205\264

此文件不存在。我尝试用谷歌搜索这个问题,但没有找到任何东西。

I have installed Marmalade and downloaded some interesting packages. But now, when I start Emacs I get this error:

Cannot open load file: c:/Documents and Settings/Carlos/Datos de programa/.emacs.d/elpa/archives/-pkg

If I use --debug-init, I get:

Debugger entered--Lisp error: (file-error "Cannot open load file" "c:/Documents and Settings/Carlos/Datos de programa/.emacs.d/elpa/archives/-pkg")
load("c:/Documents and Settings/Carlos/Datos de programa/.emacs.d/elpa/archives/-pkg" nil t)
(if (file-directory-p pkg-dir) (load (concat pkg-dir ... "-pkg") nil t))
(let ((pkg-dir ...)) (if (file-directory-p pkg-dir) (load ... nil t)))

package-load-descriptor("c:/Documents and Settings/Carlos/Datos de programa/.emacs.d/elpa/" "archives")
(lambda (name) (package-load-descriptor dir name))("archives")
mapc((lambda (name) (package-load-descriptor dir name)) ("anything-1.287" "anything-  complete-1.86" "anything-config-0.4.1" "archive-contents" "archive-contents~" "archives" "auto-indent-mode-0.35" "builtin-packages" "builtin-packages~" "clojure-mode-1.7.1" "clojurescript-mode-0.5" "coffee-mode-0.3.0" "color-file-completion-1.0.1" "color-theme-6.6.1" "color-theme-eclipse-0.0.2" "color-theme-github-0.0.3" "color-theme-railscasts-0.0.2" "color-theme-twilight-0.1" "css-mode-1.0" "drag-stuff-0.0.3" "evernote-mode-0.41" "find-file-in-project-2.0" "flymake-coffee-0.4" "flymake-haml-0.5" "flymake-ruby-0.4" "flymake-shell-0.5" "haml-mode-3.0.14" "highlight-parentheses-1.0.1" "html-script-src-0.0.2" "inf-ruby-2.1" "js-comint-0.0.1" "js2-mode-20090814" "lua-mode-20100617" "package.el" "package.el~" "project-local-variables-0.2" "ruby-compilation-0.7" "ruby-electric-1.1" "ruby-mode-1.1" "slime-20100404" "tabbar-2.0.1" "tabbar-ruler-0.2" "yasnippet-0.6.1" "yasnippet-bundle-0.6.1" "zenburn-1.8"))
(if (file-directory-p dir) (mapc (lambda ... ...) (directory-files dir nil "^[^.]")))
(lambda (dir) (if (file-directory-p dir) (mapc ... ...)))("c:/Documents and Settings/Carlos/Datos de programa/.emacs.d/elpa/")
mapc((lambda (dir) (if (file-directory-p dir) (mapc ... ...))) ("c:/Documents and Settings/Carlos/Datos de programa/.emacs.d/elpa/" "/usr/share/emacs/site-lisp/elpa/"))
package-load-all-descriptors()
package-initialize()
  (progn (package-initialize))
(if (load (expand-file-name "~/.emacs.d/elpa/package.el")) (progn (package-initialize)))
(when (load (expand-file-name "~/.emacs.d/elpa/package.el")) (package-initialize))
eval-buffer(#<buffer  *load*> nil "c:/Documents and Settings/Carlos/Datos de programa/.emacs" nil t)  ; Reading at buffer position 9019
load-with-code-conversion("c:/Documents and Settings/Carlos/Datos de programa/.emacs" "c:/Documents and Settings/Carlos/Datos de programa/.emacs" t t)
load("~/.emacs" t t)
#[nil "\205\264

This file doesn't exist. I've tried searching for this problem with Google but I didn't find anything.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

淤浪 2024-12-24 01:21:10

简单的。无论出于何种原因,您现在使用的 package.el 都是来自 http://tromey.com/elpa/package.el 的“经典”版本。它与最新版本的 package.el 非常不兼容。我不知道你是如何使用该版本安装 Marmalade 软件包的;当您安装这些软件包时,您一定使用了不同版本的 package.el,这可能是因为您当时使用的是较新的 Emacs。

解决方法是使用与 Emacs 捆绑的版本(如果它足够新),或者将 ~/.emacs.d/elpa/package.el 替换为 此版本,如上所述在 果酱说明

Easy. For whatever reason, the package.el you're now using is the "classic" version from http://tromey.com/elpa/package.el. It's wildly incompatible with recent versions of package.el. How you managed to install Marmalade packages using that version, I don't know; you must have had a different version of package.el when you installed those packages, perhaps because you were using a newer Emacs at the time.

The fix is to use the version bundled with your Emacs (if it's new enough to have one), or to replace your ~/.emacs.d/elpa/package.el with this version instead, as described in the Marmalade instructions.

演出会有结束 2024-12-24 01:21:10

我在尝试解决类似问题时偶然发现了这个问题。就我而言,强制 package-initialize 已经解决了问题:

;; init.el
(require 'package)
(package-initialize)

尽管我没有阅读 package.el 的源代码,但我相信某种懒惰package.el 中的 解决了这个问题。虽然这是一个老问题,但我想回答一下,以防其他人需要帮助。

有关 Emacs 启动的更多信息,请参阅 http:// /www.gnu.org/software/emacs/manual/html_node/elisp/Startup-Summary.html

I've stumbled upon this question while trying to solve a similar problem. In my case, forcing package-initialize have solved the problem:

;; init.el
(require 'package)
(package-initialize)

Even though I did not read the source code for package.el, I believe some kind of laziness in package.el is cousing the problem. Athough this is and old question, I wanted to answer, in case someone else need some help.

For more information on Emacs start-up, see http://www.gnu.org/software/emacs/manual/html_node/elisp/Startup-Summary.html.

平安喜乐 2024-12-24 01:21:10

使用 touch ~/.emacs.d/elpa/archives/-pkg 添加文件而不是目录为我解决了这个问题。

Adding a file, not directory, using touch ~/.emacs.d/elpa/archives/-pkg solved it for me.

听风吹 2024-12-24 01:21:10

我认为如果您在以下位置手动创建目录,它可能会消失:

c:/Documents and Settings/Carlos/Datos de programa/.emacs.d/elpa/archives/-pkg

I think it may just go away if you manually create a directory at:

c:/Documents and Settings/Carlos/Datos de programa/.emacs.d/elpa/archives/-pkg
软的没边 2024-12-24 01:21:10

就我而言,我必须添加此指令来告诉 emacs 在哪里可以找到所需的文件:

首先这一行

(add-to-list 'load-path "~/.emacs.d/")

以及所需的包...

(require 'package)
(add-to-list 'package-archives
             '("marmalade" . "http://marmalade-repo.org/packages/") t)
(package-initialize)

(when (not package-archive-contents)
  (package-refresh-contents))

In my case I had to add this directive to tell emacs where it can find the files required:

First this line

(add-to-list 'load-path "~/.emacs.d/")

And the required package ...

(require 'package)
(add-to-list 'package-archives
             '("marmalade" . "http://marmalade-repo.org/packages/") t)
(package-initialize)

(when (not package-archive-contents)
  (package-refresh-contents))
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文