Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have a bug-problem with the apt-packages of emacs:

>>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 30.
dpkg: error processing emacs23-lucid (--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 installed.
  Package emacs23-lucid which provides emacs23 is not configured yet.
  Package emacs23-nox which provides emacs23 is not installed.
  Package emacs23-lucid is not configured yet.
  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-lucid
 emacs
E: Sub-process /usr/bin/dpkg returned an error code (1)

In fact I would be satisfied with just emacs23-nox, a couple of plugins - from apt. But I can neither --purge nor --purge reinstall, nor remove the packages. It always processes until this certain bug. I did some google-searching, found some stuff on Launchpad suggesting:

sudo apt-get install --reinstall --purge emacsen-common

But this is the same... so I hope there a way to tell app to just remove everything releated to emacs, and to start from scratch again?

Thanks, Marius

share|improve this question
2  
Have you tried to remove the emacs23-lucid ? That is the package causing the error. –  João Pinto Dec 2 '10 at 14:12
    
yes, it ends, throwing the same error. –  wishi Dec 2 '10 at 14:15
    
have you tried using --force-all? –  RolandiXor Dec 2 '10 at 15:36
1  
"sudo rm /var/lib/dpkg/info/emacs23-lucid.postinst" and then "sudo apt-get purge emacs23-lucid" –  João Pinto Dec 2 '10 at 15:45
    
hmh, no... doesn't fix my problem. This installs emacs23, and the problem remains the same with a different package. –  wishi Dec 3 '10 at 13:29

2 Answers 2

up vote 4 down vote accepted

When the {pre,post}-{installation,removal} script of a package throws errors, sometimes you won't be able to finish installing or remove the package. This can come about either due to a bug in the package (or sometimes another package), in which case you should try to identify the problem and report the bug, or because you've been mucking about inside /usr, in which case, well, don't.

The workaround is to either do what it takes to satisfy the package script, or comment out the offending command in the package script. The package script you're having trouble with is located in /var/lib/dpkg/info/emacs23-lucid.postinst. The particular command that's failing is /usr/lib/emacsen-common/emacs-install ${FLAVOR}.

The first thing you should try is to fix the underlying problem. Here three files under /usr/share/emacs23 are missing. They should be symbolic links to the corresponding files under /usr/share/emacs. If they are broken symbolic links, try removing them; if the files under /usr/share/emacs23 don't exist but the files under /usr/share/emacs do, try creating the symbolic links.

If you don't manage to fix the problem, either

  • comment out the offending line: edit the package script, add a # at the beginning of the problematic line(s);
  • or ignore the error: add || true at the end of the problematic command, or remove set -e near the beginning of the file.

Beyond removing and reinstalling the emacs23-lucid package, you may need to reinstall other packages to put your system into a sane state, in particular the dictionaries-common package which provides the three troublesome .el files.

share|improve this answer

There are very many unnecessary dependencies linked to Emacs for some reason. My advice is to remove all Launchpad versions of Emacs, Emacsen, and any other flavors of Emacs.

Your next step is to go to gnu.org and download the latest Emacs that is available. You may have to build Emacs before installing it, but what you get from GNU will work without the extra baggage that either Ubuntu, Canonical, or Launchpad requires.

I have other thoughts and opinions on this issue, but I have already gone too far as it is.

share|improve this answer
    
I don't think you've gone too far at all. Go on, tell it like it is! –  Teemu Leisti Sep 9 '13 at 10:48

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.