破坏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,  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) 

问题的解决方案绝对不容忽视。 我做的第一件事是安装字典 – 普通包,因为这是导致初始问题的原因。

 sudo apt-get install --reinstall dictionaries-common 

在那之后,我刚刚解决了一个问题。 我手动收集有问题的文件并将它们放在要求的地方,这就是解决我的问题的原因。 从这里学到的一个重要教训是在任何情况下都不要弄乱系统文件。

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

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

我已经安装了emacs24 ,如果这对您emacs24

sudo apt-get install emacs24

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