Emacs无法加载其启动文件

Emacs无法加载其启动文件,emacs,emacs23,Emacs,Emacs23,我将远程终端上的emacs升级为23快照。由于我在那里没有root权限,所以我在主目录中的文件夹中设置了“makeinstall”,并将“prefix”设置为“makeinstall”。现在,当我启动emacs时,它给出了一个错误“无法打开加载文件:编码kb”,它也无法运行dired或加载cc模式。我试着以“--no site file”、“-Q”、“-Q”开头,它们都有相同的问题。我的.emacs是空的。有什么建议吗 谢谢你的帮助 问候,, 尼希斯 更新:这些是我尝试运行“emacs”无参数时

我将远程终端上的emacs升级为23快照。由于我在那里没有root权限,所以我在主目录中的文件夹中设置了“makeinstall”,并将“prefix”设置为“makeinstall”。现在,当我启动emacs时,它给出了一个错误“无法打开加载文件:编码kb”,它也无法运行dired或加载cc模式。我试着以“--no site file”、“-Q”、“-Q”开头,它们都有相同的问题。我的.emacs是空的。有什么建议吗

谢谢你的帮助

问候,, 尼希斯

更新:这些是我尝试运行“emacs”无参数时收到的消息

Warning: arch-dependent data dir (/usr/local/libexec/emacs/23.0.93/x86_64-unknown-linux-gnu/) does not exist.
Warning: Lisp directory `/usr/local/share/emacs/23.0.93/site-lisp' does not exist.
Warning: Lisp directory `/usr/local/share/emacs/site-lisp' does not exist.
Warning: Lisp directory `/usr/local/share/emacs/23.0.93/lisp' does not exist.
Warning: Lisp directory `/usr/local/share/emacs/23.0.93/leim' does not exist.
这是一个64位系统。Emacs源代码是使用

cvs -d:pserver:anonymous@cvs.sv.gnu.org:/sources/emacs co emacs
更新2: 谢谢查理和崔的回答。我想我将跳过“makeinstall”,暂时坚持使用src/emacs。 干杯。

“encoded kb.el”在EMACS lisp目录中的标准国际化代码中,因此有些东西没有找到正确的路径。你的装载路径被软管堵塞了。makefile中有一些钩子,可以让您显式地设置加载路径应该是什么来解决这个问题

尝试在启动后转储加载路径,比如使用
(pp加载路径)
,看看它到底在看什么。要对此进行评估,请键入

(pp load-path)^j

在您的
*scratch*
缓冲区中。该缓冲区应处于lisp交互模式。
^j
(Control-j,又名C-j)表示要对其进行评估。而且
pp
会很好地打印列表。

AFAIK,
makeinstall
是需要的,以防您要在系统范围内安装软件包。Prefix仅定义系统范围安装的前缀路径,但它仍然需要正确的目录层次结构(bin/、/lib、/share等)。如果您只是想使用CVS Emacs,可以在
make
过程之后立即运行它。例如,我的Emacs源代码位于
~/src/Emacs/
,我可以简单地键入
~/src/Emacs/src/Emacs
,以运行Emacs。

对于我来说,当我没有更改Makefiles中的
前缀
变量时,这个错误消失了,我做了一个:

./configure --prefix=/my_special_path/usr/local

在AIX上构建emacs 23.1时,我遇到了同样的问题。在我的例子中,我想在我的目录中安装emacs,因为我是唯一使用emacs的开发人员。可以通过在运行configure之前修改src/epath.in文件中的路径来解决此问题。Configure使用此文件创建epath.h。--prefix=参数不会更改epath.in文件中的路径。使用--prefix=并修改epath.in文件修复了我的问题。

在我的例子中,我的MacOSX只是指向旧版本的Emacs,我不知道为什么。所以,当我在图形界面上打开它时,一切正常,但当我试图在终端上打开它时,我得到了那个错误。因此,我首先找到了快捷方式指向的位置,并修复了
/usr/bin/emacs
路径,如下所示:

$ emacs --version
GNU Emacs 22.1.1
Copyright (C) 2007 Free Software Foundation, Inc.
GNU Emacs comes with ABSOLUTELY NO WARRANTY.
You may redistribute copies of Emacs
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.
$ whereis emacs
/usr/bin/emacs
$ sudo rm /usr/bin/emacs 
$ sudo ln -s /usr/local/Cellar/emacs/HEAD/bin/emacs /usr/bin/emacs
$ emacs --version
GNU Emacs 24.4.50.1
Copyright (C) 2014 Free Software Foundation, Inc.
GNU Emacs comes with ABSOLUTELY NO WARRANTY.
You may redistribute copies of Emacs
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.

在Windows7上构建Emacs25.0.92时,我遇到了同样的问题

D:\emacs\bin>emacs
Warning: arch-dependent data dir 'd:/emacs/libexec/emacs/24.5/x86_64-w64-mingw32/': Invalid argument
Warning: arch-independent data dir 'd:/emacs/share/emacs/24.5/etc/': Invalid argument
Warning: Lisp directory 'd:/emacs/share/emacs/24.5/site-lisp': Invalid argument
Warning: Lisp directory 'D:/emacs/share/emacs/24.5/lisp': Invalid argument
我发现了问题所在。有一个系统注册表项:
HKEY\u LOCAL\u MACHINE\SOFTWARE\GNU\Emacs
,它定义加载路径
EMACSLOADPATH


我只是删除注册表项来解决问题。

还要检查是否有名为
EMACSPATH
的环境变量。Emacs希望它是一个目录。

启动Emacs时,您能再显示一点您收到的消息吗?+1如果您想要非全局安装,这是您应该做的。为我工作。谢谢