本文介绍了ELPA / Marmalade报告“无法打开加载文件” for〜/ .emacs.d / elpa / archives / -pkg的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

 无法打开加载文件:c:/ Documents and Settings / Carlos / Datos de programa / .emacs.d / elpa / archives / -pkg 

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

 调试器输入 -  Lisp错误: (文件错误无法打开加载文件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 / -pkgnil t)
(if(file-directory-p pkg-dir)(load(concat pkg-dir ... pkg)
(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.287anything- complete-1.86anything-config-0.4。 1档案-contentsarchive-contents〜archivesauto-indent-mode-0.35builtin-packagesbuiltin-packages〜clojure-mode-1.7.1clojurescript-mode-0.5 -mode-0.3.0color-file-completion-1.0.1color-theme-6.6.1color-theme-eclipse-0.0.2color-theme-github-0.0.3 color-theme-railscasts-0.0.2color-theme-twilight-0.1css-mode-1.0drag-stuff-0.0.3e-christmas-mode-0.41find-file-in-project -2.0flymake-coffee-0.4flymake-haml-0.5flymake-ruby-0.4flymake-shell-0.5haml-mode-3.0.14highlight-parentheses-1.0.1 html-script-src-0.0.2inf-ruby-2.1js-comint-0.0.1js2-mode-20090814lua-mode-20100617package.elpackage.el〜 project-local-variables-0.2ruby-compilation-0.7ruby-electric-1.1ruby-mode-1.1slime-20100404tabbar-2.0.1tabbar-ruler-0.2 yasnippet-0.6.1yasnippet-bundle-0.6.1zenburn-1.8))
(if(file-directory-p dir)(mapc(lambda ... ...) -files dir nil^ [^。])))
(lambda(dir)(if(file-directory-p d ir)(mapc ...)))(c:/ Documents and Settings / Carlos / Datos de programa / .emacs.d / elpa /)
mapc((lambda(dir) (file-directory-p dir)(mapc ...)))(c:/ Documents and Settings / Carlos / Datos de programa / .emacs.d / elpa // usr / share / emacs /
package-initialize()
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 *> nilc:/ Documents and Settings / Carlos / Datos de programa / .emacsnil t);在缓冲位置读取9019
加载代码转换(c:/ Documents and Settings / Carlos / Datos de programa / .emacsc:/ Documents and Settings / Carlos / Datos de programa / .emacs tt)
load(〜/ .emacstt)
#[nil\205\264

此文件不存在,我已经尝试使用Google搜索这个问题,但没有找到任何内容。

解决方案

容易,无论什么原因,您现在使用的 package.el http://tromey.com/elpa/package.el 。它与最近版本的 package.el 非常不兼容,您如何设法使用该版本安装Marmalade软件包,我不知道;您安装这些软件包时,您必须具有不同版本的 package.el ,可能是因为您使用的是较新的Emacs在当时。



修复是使用与您的Emacs捆绑的版本(如果它是新的enoug h有一个),或者用,如。


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.

解决方案

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.

这篇关于ELPA / Marmalade报告“无法打开加载文件” for〜/ .emacs.d / elpa / archives / -pkg的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-28 00:03