Can't install emacs23

Bug #673350 reported by BobvanderPoel
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
emacs-snapshot (Ubuntu)
Incomplete
Undecided
Unassigned

Bug Description

I've tried installing emacs23 and emacs-snapshot and keep getting dependency errors during the install. I just tried dpkg --configure -a and that spews a bunch of errors and the suggestion that I report an error ... of course I have no idea to whom to report!

Here's the last dpkg stuff:

bob$ sudo dpkg --configure -a
Setting up emacs-snapshot (1:20090909-1) ...
Byte-compiling add-on packages, please wait... failed.

!! Byte-compilation for emacs-snapshot failed!
!! This indicates a bug in one of the add-on packages
!! installed on your system, or a bug in Emacs itself.
!! Please file a bug report against emacs-snapshot
!! and attach the file /tmp/emacs-snapshot.sCBfxT
dpkg: error processing emacs-snapshot (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up emacs23-lucid (23.1+1-4ubuntu7) ...
emacs-install emacs23
install/a2ps: Handling install for emacsen flavor emacs23
Wrote /usr/share/emacs23/site-lisp/a2ps/path.elc
install/auctex: Setting up for emacs23 (log file: /usr/share/emacs23/site-lisp/auctex//CompilationLog)... done.
update-auctex-elisp[5686]: Further output will appear in: /var/log/auctex-emacs23.log.
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-lucid (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of auctex:
auctex depends on emacs23 | emacs22 | emacs21 | emacs-snapshot; however:
Package emacs23 is not installed.
Package emacs23-lucid which provides emacs23 is not configured yet.
Package emacs22 is not installed.
Package emacs21 is not installed.
Package emacs-snapshot is not configured yet.
dpkg: error processing auctex (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of emacs-snapshot-gtk:
emacs-snapshot-gtk depends on emacs-snapshot; however:
Package emacs-snapshot is not configured yet.
dpkg: error processing emacs-snapshot-gtk (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
emacs-snapshot
emacs23-lucid
auctex
emacs-snapshot-gtk

and the contents of the log file:

bob$ sudo cat /tmp/emacs-snapshot.sCBfxT
[sudo] password for bob:
emacs-install emacs-snapshot
install/a2ps: Handling install for emacsen flavor emacs-snapshot
>>Error occurred processing *.el: File error (("Opening input file" "no such file or directory" "/usr/share/emacs-snapshot/site-lisp/a2ps/*.el"))
Wrote /usr/share/emacs-snapshot/site-lisp/a2ps/path.elc
emacs-install: /usr/lib/emacsen-common/packages/install/a2ps emacs-snapshot failed at /usr/lib/emacsen-common/emacs-install line 28, <TSORT> line 4.

affects: ubuntu → emacs-snapshot (Ubuntu)
Revision history for this message
era (era) wrote :

The symptoms seem to point to missing files. I have been speculating that these might be caused by dpkg fsync problems. In any event, you may be able to recover by purging, then reinstalling dictionaries-common. As for the a2ps problem, purging a2ps should allow you to install emacs23 and emacs-snapshot; you may possibly be able to reinstall a2ps then, but this could be over-optimistic speculation on my part.

I'm hesitant to reassign this to dictionaries-common and/or a2ps and/or dpkg until we hear back from you. If you can report your dpkg version here, that would be most helpful.

I'm setting the status of this bug report to Incomplete to signal that we are expecting a followup from you. The status can be changed back to New (or even Confirmed) once you supply the requested information. Thanks in advance!

Changed in emacs-snapshot (Ubuntu):
status: New → Incomplete
Revision history for this message
BobvanderPoel (bob-mellowood) wrote :

Okay, let's see if I can help ....

1. I did in the process of trying to remove-completely a2ps. It made no difference. Originally I was getting the error that /usr/share/emacs-snapshot/site-lisp/a2ps/ could not be accessed. I then manually created the a2ps directory ... and then I got the *.el message. It could well be an a2ps problem, but like I said I deleted a2ps and still had the same issue ... so, probably not :)

2. Okay, tried to delete the dictionaries-common package. Again, I get an error. Here's the log:

bob$ sudo cat /tmp/emacs*W
[sudo] password for bob:
emacs-install emacs-snapshot
install/a2ps: Handling install for emacsen flavor emacs-snapshot
Wrote /usr/share/emacs-snapshot/site-lisp/a2ps/path.elc
install/auctex: Setting up for emacs-snapshot (log file: /usr/share/emacs-snapshot/site-lisp/auctex//CompilationLog)... done.
update-auctex-elisp[8619]: Further output will appear in: /var/log/auctex-emacs-snapshot.log.
emacsen-common: Handling install of emacsen flavor emacs-snapshot
emacsen-common: byte-compiling for emacs-snapshot
cp: cannot stat `/etc/emacs/site-start.d/00debian-vars.el': No such file or directory
emacs-install: /usr/lib/emacsen-common/packages/install/emacsen-common emacs-snapshot failed at /usr/lib/emacsen-common/emacs-install line 28, <TSORT> line 3.

Reinstalling dictionaries-common generates a slightly different error:

bob$ sudo cat /tmp/emacs*2
emacs-install emacs-snapshot
install/a2ps: Handling install for emacsen flavor emacs-snapshot
Wrote /usr/share/emacs-snapshot/site-lisp/a2ps/path.elc
install/auctex: Setting up for emacs-snapshot (log file: /usr/share/emacs-snapshot/site-lisp/auctex//CompilationLog)... done.
update-auctex-elisp[15677]: Further output will appear in: /var/log/auctex-emacs-snapshot.log.
install/dictionaries-common: Skipping byte-compilation for emacs-snapshot
emacsen-common: Handling install of emacsen flavor emacs-snapshot
emacsen-common: byte-compiling for emacs-snapshot
cp: cannot stat `/etc/emacs/site-start.d/00debian-vars.el': No such file or directory
emacs-install: /usr/lib/emacsen-common/packages/install/emacsen-common emacs-snapshot failed at /usr/lib/emacsen-common/emacs-install line 28, <TSORT> line 4.

3. bob$ dpkg --version
Debian `dpkg' package management program version 1.15.8.4ubuntu1 (i386).

Hope this helps. Please let me know what else I can do to help.

Changed in emacs-snapshot (Ubuntu):
status: Incomplete → New
Revision history for this message
era (era) wrote :

This sounds like bug #582341 -- does apt-get install --reinstall --purge emacsen-common work for you? I also speculate that the root cause could be bug #512096.

Changed in emacs-snapshot (Ubuntu):
status: New → Incomplete
Revision history for this message
BobvanderPoel (bob-mellowood) wrote :
Download full text (4.9 KiB)

Sorry, but that doesn't work either:

bob$ sudo apt-get install --reinstall --purge emacsen-common
[sudo] password for bob:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libatk1.0-dev libxcb-shm0-dev libpango1.0-dev fp-units-gfx fp-utils fp-units-gtk libcairo2-dev
  libdts-dev fp-units-net fp-units-db libogg-dev fp-units-math fp-units-fv fp-units-misc dict
  libgtk2.0-dev recode libdca-dev libmad0-dev fp-ide liba52-0.7.4-dev libcairo-gobject2 libmaa2
  libmodplug0c2 libxcb-render0-dev fp-units-gnome1 libgdk-pixbuf2.0-dev libvorbis-dev
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 1 not upgraded.
4 not fully installed or removed.
Need to get 0B/19.0kB of archives.
After this operation, 0B of additional disk space will be used.
(Reading database ... 266804 files and directories currently installed.)
Preparing to replace emacsen-common 1.4.19ubuntu1 (using .../emacsen-common_1.4.19ubuntu1_all.deb) ...
emacsen-common: Handling removal of emacsen flavor emacs
Unpacking replacement emacsen-common ...
Setting up emacs-snapshot (1:20090909-1) ...
Byte-compiling add-on packages, please wait... failed.

!! Byte-compilation for emacs-snapshot failed!
!! This indicates a bug in one of the add-on packages
!! installed on your system, or a bug in Emacs itself.
!! Please file a bug report against emacs-snapshot
!! and attach the file /tmp/emacs-snapshot.QBb35k
dpkg: error processing emacs-snapshot (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of emacs-snapshot-gtk:
 emacs-snapshot-gtk depends on emacs-snapshot; however:
  Package emacs-snapshot is not configured yet.
dpkg: error processing emacs-snapshot-gtk (--configure):
 dependency problems - leaving unconfigured
Setting up emacs23-lucid (23.1+1-4ubuntu7) ...
No apport report written because the error message indicates its a followup error from a previous failure.
      emacs-install emacs23
install/a2ps: Handling install for emacsen flavor emacs23
Warning: Lisp directory `/usr/local/share/emacs/site-lisp' does not exist.
Wrote /usr/share/emacs23/site-lisp/a2ps/path.elc
install/auctex: Setting up for emacs23 (log file: /usr/share/emacs23/site-lisp/auctex//CompilationLog)... done.
update-auctex-elisp[25067]: Further output will appear in: /var/log/auctex-emacs23.log.
install/dictionaries-common: Already byte-compiled for emacs23. Skipping ...
emacsen-common: Handling install of emacsen flavor emacs23
emacsen-common: byte-compiling for emacs23
cp: cannot stat `/etc/emacs/site-start.d/00debian-vars.el': No such file or directory
emacs-install: /usr/lib/emacsen-common/packages/install/emacsen-common emacs23 failed at /usr/lib/emacsen-common/emacs-install line 28, <TSORT> line 4.
dpkg: error processing emacs23-lucid (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of auctex:
 auctex depends on emacs23 | emacs22 | emacs21 | emacs-snapshot; howe...

Read more...

Revision history for this message
BobvanderPoel (bob-mellowood) wrote :

Further, looking at bug 512096 I see that there is an empty file /var/lib/dpkg/info/emacs23.list. Would it be safe to remove this file and try again?

.

Revision history for this message
era (era) wrote :

The .list file is supposed to contain a list of all the files installed by the emacs23 package. It is managed by dpkg. Reinstalling emacs23 should recreate this file, with a list of all files installed.

The lack of required files from various packages is definitely the root cause here. When a package is installed, its files should be written to disk, but this doesn't seem to be true for you always. I can repeat my speculation that there could be a dpkg sync problem (bug #512096) -- perhaps you could try again with a different version of dpkg?

If your aim is to simply get this out of the way as soon as possible, I cannot help but think a complete reinstall would seem like the safest way to proceed. If you can help figure out why this is happening, and live with the current situation a little while longer, it would be much appreciated, though.

Just to reduce the number of variables, you could remove a2ps and auctex from your system for the time being, then reinstall emacsen-common until 00debian-vars.el et al. are properly created.

You have not experienced a disk full condition at any point during this, have you?

Revision history for this message
era (era) wrote :

The upstream bug at http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=430958 has some more discussion and insights. Could you please submit the contents of /etc/mtab so we can see what file systems you have mounted and where?

Revision history for this message
BobvanderPoel (bob-mellowood) wrote :

You might be correct in looking at http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=430958 except that:

 - I've not had any system crashes which might cause this

 - the version of dpkg I have is 1.15.8.4ubuntu1 (i386) and in the bug list you pointed out the lists a fix in 1.15.6. Do you think it's a goo idea to go back in revisions of such a major part of the system?

 - no disk full problems.
 bob$ df .
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda1 471793992 91693244 356135004 21% /

 - I've got a number of empty list files in var/lib/dpkg/info/. I think this is getting scary:

       find . -empty | wc
    110 110 2437

This is out of 2400+ packages installed.

And the disks on the system:

bob$ cat /etc/mtab
/dev/sda1 / ext4 rw,errors=remount-ro,commit=0 0 0
proc /proc proc rw,noexec,nosuid,nodev 0 0
none /sys sysfs rw,noexec,nosuid,nodev 0 0
fusectl /sys/fs/fuse/connections fusectl rw 0 0
none /sys/kernel/debug debugfs rw 0 0
none /sys/kernel/security securityfs rw 0 0
none /dev devtmpfs rw,mode=0755 0 0
none /dev/pts devpts rw,noexec,nosuid,gid=5,mode=0620 0 0
none /dev/shm tmpfs rw,nosuid,nodev 0 0
none /var/run tmpfs rw,nosuid,mode=0755 0 0
none /var/lock tmpfs rw,noexec,nosuid,nodev 0 0
/dev/sdb /media/Mirror ext4 rw,errors=remount-ro,commit=0 0 0
rpc_pipefs /var/lib/nfs/rpc_pipefs rpc_pipefs rw 0 0
nfsd /proc/fs/nfsd nfsd rw 0 0
binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc rw,noexec,nosuid,nodev 0 0
/dev/sdc1 /media/8dca643b-5736-4dab-a93e-e9a448966735 ext3 rw,nosuid,nodev,uhelper=udisks 0 0
gvfs-fuse-daemon /home/bob/.gvfs fuse.gvfs-fuse-daemon rw,nosuid,nodev,user=bob 0 0

Fortunately, emacs is working just fine :)

Oh, and early on in this process I did delete/remove a2ps and auctex and everything else i could find related to emacs. In fact I manually deleted all the emacs in /usr/share, /usr/bin, and /etc. No joy.

I'll continue to debug from my end. I'm sure I'm not the only one with the problem and would really like to get it figured out!

Best.

Revision history for this message
BobvanderPoel (bob-mellowood) wrote :

I'm wondering if this means anything? In the directory

 /usr/share/emacs23/site-lisp/a2ps

I have a listing:

bob$ ls -l
total 4
lrwxrwxrwx 1 root root 36 2010-11-09 17:26 *.el -> /usr/share/emacs/site-lisp/a2ps/*.el
-rw-r--r-- 1 root root 651 2010-11-13 19:05 path.elc

with the file, yes!, *.el a sym-link to a non-existent file. Is part of the install needing some quotes or something? Just a thought.

BTW, I see the status of this bug is still "incomplete" ... do you need more?

Revision history for this message
era (era) wrote :

The *.el symlink looks like an side effect of the a2ps postinst script. It should rightfully expect *.el to expand, but if it the files are not properly installed, this is what you will get. (Haven't looked at the script recently but IIRC this is how it works.) The root cause is still that some files have not landed on the disk when their package was installed.

There can legitimately be some empty .list files, not all packages ship actual files; for example, some packages are useful solely because their postinst scripts do something useful, or because they depend on a useful set of other packages. However, it would be great if you could include the list of empty .list files here as an attachments so we can compare with a legit install.

I note that your main file system is ext4; perhaps this is a clue?

I'll leave the Status as Incomplete to remind us that the list of empty .list files is still pending. Feel free to set the Status back to New once you have uploaded this. Thanks.

Revision history for this message
BobvanderPoel (bob-mellowood) wrote : Re: [Bug 673350] Re: Can't install emacs23

Sorry, but since I don't see a timely fix for this I'm leaving the
looking to you guys. I've installed emacs from source and have no
problems.

Best.

Revision history for this message
Jianbo Li (afellowljb) wrote :

I have the same problem after manually remove emacs:

cp: cannot stat `/etc/emacs/site-start.d/00debian-vars.el': No such file or directory

When I looked into the directory under /etc/emacs/site-start.d/. I found nothing.

Fortunately, I have another Ubuntu desktop. when I looked into the same folder, I find the following:

$ ls /etc/emacs
site-start.d site-start.el

$ ls /etc/emacs/site-start.d/
00debian-vars.el 50dictionaries-common.el 50latex-cjk-common.el
50asymptote.el 50global.el 50maxima-emacs.el
50autoconf.el 50gnuplot-mode.el

I just replace the empty /etc/emacs folder, and run
$sudo apt-get -f install
Aha, everything is now perfect.

Hope this can help.

Revision history for this message
era (era) wrote :

Jianbo Li: which file system do you have on the drive? Which version of dpkg?

Revision history for this message
liuzhang (liuzhang1201) wrote :

I had the same problem and I fixed it by installing the dictionary-el package.

Hope it works for you, bob.

Revision history for this message
superxor (phaneendra-chiruvella) wrote :

I am running Ubuntu 11.10 i386. I had faced the same problem when I had accidentally deleted /etc/emacs/site-start.d/00debian-vars.el. I tried installing emacs23 instead of emacs-snapshot, but it dint work. I tried installing dictionary-el package as @liuxhang1201 suggested, but even that dint work.

I took a copy of the 00debian-vars.el file from my friend's system (running the same OS) and copied it to /etc/emacs/site-start.d and then tried installing emacs-snapshot, everything works fine now.

I am attaching the 00debian-vars.el file just in case somebody needs it.

Revision history for this message
Peter Flynn (frisket) wrote :

FWIW I have just encountered this bug on multiple Ubuntu systems here, a mix of 10.*, 11.*, and 12.04
All these systems run stock LaTeX and Emacs from the default repos. I have repaired the damage manually with the following steps using Synaptic (NOT the new Software Centre, which hides too much from view):

0. Back up your site-lisp and .emacs files somewhere safe
1. Remove completely ALL emacs* and related *.el packages
2. Exit Synaptic and run it again (otherwise it gets the dependencies wrong)
3. Install emacs23 and whatever other packages you removed in [1] including ispell
4. It will fail to complete because the soft-links in emacs23/site-lisp don't have any files at the end of them in emacs/site-lisp
5. In emacs/site-lisp/dictionaries-common, grab copies of debian-ispell.el, flyspell.el, and ispell.el from somewhere else (I used http://stuff.mit.edu/afs/athena/system/amd64_deb50/os-ubuntu-10.04/usr/athena/share/emacs/site-lisp/dictionaries-common but YMMV)
6. cd .. and repeat for debian-startup.el
7. Install something harmless like css-mode.el in order to trigger apt into trying to configure emacs23, and monitor the console carefully to see what directories it fails to stat
8. In my case, because I have a very full installation of TeX, I had to re-install latex-cjk-common, thailatex, and latex-cjk-thai for some obscure reason: your system will almost certainly be different, and you may have to re-install a different set of packages.
9. When it has finished rebuilding the ls-R databases it doesn't say so, so you need to close the window.
10. Copy back any personal .el files and/or your .emacs file from backup if they were removed.

This got my system back and working; I believe from other reports that it is the absence of the three ispell files that causes the configuration to fall over; quite why debian-startup.el was missing is not clear.

Revision history for this message
Pascal Mons (anton+) wrote :

I am now encountering the same bug in Precise 12.04 after removing a "not empty" /usr/share/emacs/site-lisp/ directory while un-installing emacs24 ...

The previous post is usefull however the 3 files debian-ispell.el, flyspell.el and ipsell.el were installed. The only file missing was debian-startup.el . The best solution was to install a dedicated package conteining this file : emacsen-common

I am still left with other packages problem since I did a

$ sudo apt-get install --reinstall dictionaries-common

Revision history for this message
Pascal Mons (anton+) wrote :

[Follow-up]] I had to sometimes recreate the /usr/share/emacs/site-lisp/[package-name]
Then re-install the package [package-name] containing the .el file

Then success for re-installing emacs24 . However now all the icons for the menu buttons on top of the window are gone ... (red cross) except for File ...

Another thing to look-up. And I am short on solution for it. No icon is displayed even in the system window to open or save a file the standard buttons are red crosses. Somehow emacs has no access to the system standard icons ...

Revision history for this message
Pascal Mons (anton+) wrote :

Clarification : The 3 files debian-ispell.el, flyspell.el and ipsell.el from /usr/share/emacs/site-lisp/dictionaries-common will be re-installed with this command

$ sudo apt-get install --reinstall dictionaries-common

The file /usr/share/emacs/site-lisp/debian-startup.el will be restored by installing package emacsen-common

$ sudo apt-get install emacsen-common

If any other package related .el file was deleted / removed then you will have to re-create the directory name as the error gives its name. This was the case for cmake on my machine.

$ sudo mkdir /usr/share/emacs/site-lisp/[package-name]

Then re-install the [pacage-name] containing the .el file when an error is poppping up for that particular package.

In my case re-installing from the following ppa https://launchpad.net/~cassou/+archive/emacs gave me back a fully working emacs24 installation.

I still have a problem with my own compilation and build of the packages for missing link to system icons ...

Changed in emacs-snapshot (Ubuntu):
assignee: nobody → rosa maria (rprosamaria383)
dobey (dobey)
Changed in emacs-snapshot (Ubuntu):
assignee: rosa maria (rprosamaria383) → nobody
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.