2

First of all, I am really sorry about behaving like an over smart. But hope you will be able to help me under the circumstance I am right now.

I was having some difficulty with emacs in my Ubuntu 12.04.2 installation. So I decided to reinstall everything from scratch. The steps I took are,

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

Now whenever I try to install emacs, it tells me it can't find ispell,flyspell and debian-ispell and installation not completed, dpkg error. What can I do to fix it?

(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

edit: This is the output i get, if anyone is interested

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)
rafee
  • 181
  • 1
  • 12

3 Answers3

1

The solution to the problem was absolutely non-trivial. The first thing I did, was installing dictionaries-common package, because that's what causing initial problem.

sudo apt-get install --reinstall dictionaries-common

After that I just tackled one problem after other. I collected problematic files manually and put them where asked and that's what solved my problem. One big lesson to learn from here is to never mess with system files under any circumstances.

rafee
  • 181
  • 1
  • 12
0

To download all the dependencies, use:

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

I've installed emacs24, if this will work for you:

sudo apt-get install emacs24

Radu Rădeanu
  • 169,590
-1

Try: sudo apt-get purge emacs24 then sudo apt-get install -f emacs24