6

我将远程终端上的 emacs 升级为 23-snapshot。因为我在那里没有root权限,所以我做了'make install'并将'prefix'设置为我的主目录中的一个文件夹。现在,当我启动 emacs 时,它给出了一个错误“无法打开加载文件:编码-kb”,它也无法运行 dired 或加载 cc-mode。我试着用'--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 使用

cvs -d:pserver:anonymous@cvs.sv.gnu.org:/sources/emacs co emacs

update2:感谢查理和特雷的回答。我想我会跳过“make install”并暂时坚持使用 src/emacs。干杯。

4

7 回答 7

4

对我来说,当我没有更改prefixMakefile 中的变量时,这个错误消失了,而是:

./configure --prefix=/my_special_path/usr/local
于 2009-08-28T20:09:39.293 回答
2

“encoded-kb.el”在 EMACS lisp 目录中的标准国际化代码中,所以有些东西没有走上正确的道路。您的负载路径在某处被软管。makefile 中有一些钩子可以让你明确设置加载路径应该是什么来解决这个问题。

启动后尝试转储您的加载路径,说出(pp load-path)并查看它真正在看什么。要评估它,请键入

(pp load-path)^j

在你的*scratch*缓冲区中。该缓冲区应该处于 lisp-interaction 模式。( ^jControl-j, aka Cj) 说要评估它。并且pp将漂亮地打印列表。

于 2009-05-21T04:59:53.830 回答
2

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

于 2009-05-21T05:04:07.917 回答
2

就我而言,我的 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.
于 2014-08-05T17:40:17.383 回答
1

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

于 2010-01-21T17:27:28.027 回答
1

我在 Windows 7 上构建 emacs 25.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_LOCAL_MACHINE\SOFTWARE\GNU\Emacs,它定义了加载路径EMACSLOADPATH

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

于 2016-04-06T02:25:15.063 回答
0

还要检查您是否有一个名为EMACSPATH. Emacs 期望它是一个目录。

于 2018-05-11T02:13:03.153 回答