emacs 安装损坏

emacs 安装损坏

首先,我真的很抱歉表现得过于聪明。但我希望你能在我现在的情况下帮助我。

我在安装 Ubuntu 12.04.2 时遇到了一些 emacs 问题。所以我决定从头开始重新安装所有内容。我采取的步骤如下:

sudo apt-get autoremove emacs24
cd /usr/share
sudo rm -r emacs
sudo rm -r emacs24

现在每当我尝试安装 emacs 时,它都会告诉我找不到 ispell、flyspell 和 debian-ispell,并且安装未完成,dpkg 错误。我该怎么做才能修复它?

(Reading database ... 292802 files and directories currently installed.)
Unpacking emacs (from .../emacs_24.1+1-2~ppa1~precise1_all.deb) ...
Setting up emacs23 (23.3+1-1ubuntu9.1) ...
emacs-install emacs23

编辑:这是我得到的输出,如果有人感兴趣的话

install/dictionaries-common: Byte-compiling for emacsen flavour emacs23
>>Error occurred processing debian-ispell.el: File error (("Opening input file" "no such file or directory" "/usr/share/emacs23/site-lisp/dictionaries-common/debian-ispell.el"))
>>Error occurred processing ispell.el: File error (("Opening input file" "no such file or directory" "/usr/share/emacs23/site-lisp/dictionaries-common/ispell.el"))
>>Error occurred processing flyspell.el: File error (("Opening input file" "no such file or directory" "/usr/share/emacs23/site-lisp/dictionaries-common/flyspell.el"))
emacs-install: /usr/lib/emacsen-common/packages/install/dictionaries-common emacs23 failed at /usr/lib/emacsen-common/emacs-install line 28, <TSORT> line 4.
dpkg: error processing emacs23 (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of emacs:
 emacs depends on emacs23 | emacs23-lucid | emacs23-nox; however:
  Package emacs23 is not configured yet.
  Package emacs23-lucid which provides emacs23 is not installed.
  Package emacs23-lucid is not installed.
  Package emacs23-nox is not installed.
dpkg: error processing emacs (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          Errors were encountered while processing:
 emacs23
 emacs
E: Sub-process /usr/bin/dpkg returned an error code (1)

答案1

这个问题的解决方案绝对不简单。我做的第一件事就是安装dictionaries-common包,因为这是导致最初问题的原因。

sudo apt-get install --reinstall dictionaries-common

之后,我解决了一个又一个问题。我手动收集有问题的文件并将它们放在指定的位置,这就是解决我问题的方法。从这里学到的一个重要教训是,在任何情况下都不要乱动系统文件。

答案2

要下载所有依赖项,请使用:

sudo apt-get install build-essential
sudo apt-get build-dep emacs

我已经安装了emacs24,如果这对你有用的话:

sudo apt-get install emacs24

答案3

尝试:sudo apt-get purge emacs24然后sudo apt-get install -f emacs24

相关内容