package timidity (not installed) failed to install/upgrade: subprocess new pre-installation script returned error exit status 1

Asked by Stephen Hamer

OK, I suspect that you're going to find this a bit of a head-scratcher. It's a long story...

I have ubuntu 12.04 installed on an ext HDD, but the drive is dying; it's very shakey. So recently, I took the plunge and installed 12.04 on my Samsung N110. But then I thought... Wait a minute, why not restore that tar-file backup of your old 12.04 install (which I had grown rather fond of) over the N110 system - resurect it, as it were; bring it back from the dead...? So that's what I did (last Saturday, actually) - only problem was: it left me with a "zombie"-package, soundkonverter, on the new "combined"-system (hey, this is turning into a Stephen King story!).

I had installed this package in the overwritten N110 system before the over-write, discovered that it didn't work fully (it can't detect an ext. ODD), and had foolishly forgotten about it (I should, perhaps, have uninstalled it before major surgery). The package survived the over-write, and will still open - I can find and open it with the dash, or with Alt+F2 - and, as far as I can make out, it offers the same functionality as before. I can also turn up a host of soundkonverter files by running, say: "find *soundkonverter*". I call it a "zombie"-package because synaptic can't "see" it; it comes up as uninstalled. Relatedly(?), dpkg can't "see" it either. And because these aps don't register it, I can't now uninstall it. If I try uninstalling it with dpkg, I get a "package not found"-message.

Oddly, synaptic can "see" the installed soundkonverter files. When I click on "Soundkonverter" and access the "Installed files"-tab in the "Properties"-dialogue, synaptic returns a pretty full-looking bunch of files, including the soundkonverter binary (the "installed files"-tab is normally empty for a non-installed ap); so at some level it is registering the presence of the package.

How d'ya kill something that's already dead? I thought - very momentarily - about trying to delete the package by hand, but as a task that's way above my pay-grade, and, anyway, the bloody ap's huge; uninstalling it would alo require the following major dependencies to be uninstalled:

faad
icedax
kdebase-runtime
kdemultimedia-k10-plugins
mp3gain
mppenc
speex
vorbisgain
timidity-daemon
timidity (ta-ra! I bet you were wondering when this particular character was going to turn up in the tale)

And these are just the major dependencies: each of the above packages will have its own dependencies, etc., etc.

By the way, the above aps, too, come up in synaptic as "not installed", though they are, in fact, present in my system (they must be there for soundkonverter to function), and I can find them with the find-command. They also have full "installed files"-tabs in synaptic.

What to do? After some consideration, I thught I had the answer: just re-install soundkonverter. apt or whatever, would then simply download the compressed soundkonverter deb and unpack it, overwriting the existing "installed" files. I would, in effect, be doing, on a small scale, what I hade done previously on a large scale with the system over-write. The only reason that soundkonverter wasn't overwritten by the incoming system in the first place is because the incoming system didn't contain soundkonverter (it wasn't installed in my "old" 12.04 system - the one on the ext HDD). By re-installing it, I would just be papering over a gap left by the over-write. But with one important difference, soundkonverter would threafter register in synaptic as "installed", and I could then purge it.

That was my reasoning. Of course, I didn't immediately put this plan into effect; I first tested-out the idea with a small-scale experiment: I re-installed vorbisgain, one of the smaller aps, listed above. This installed fine...

azed@azed-N110:~$ sudo apt-get install vorbisgain
[sudo] password for azed:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  wavpack python-pyquery libkeybinder0 python-keybinder
Use 'apt-get autoremove' to remove them.
The following NEW packages will be installed
  vorbisgain
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 26.7 kB of archives.
After this operation, 94.2 kB of additional disk space will be used.
Get:1 http://gb.archive.ubuntu.com/ubuntu/ precise/main vorbisgain i386 0.36-3.1ubuntu2 [26.7 kB]
Fetched 26.7 kB in 0s (194 kB/s)
Selecting previously unselected package vorbisgain.
(Reading database ... 312707 files and directories currently installed.)
Unpacking vorbisgain (from .../vorbisgain_0.36-3.1ubuntu2_i386.deb) ...
Processing triggers for man-db ...
Setting up vorbisgain (0.36-3.1ubuntu2) ...

The ap duly registered as installed in synaptic. Brilliant, brilliant, brilliant! You genius person! I thought, and jumped straight to a soundkonverter install, which went rather less happily...

azed@azed-N110:~$ sudo apt-get install soundkonverter
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  python-pyquery libkeybinder0 python-keybinder
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  faad icedax kdebase-runtime kdemultimedia-kio-plugins mp3gain mppenc speex
  timidity timidity-daemon
Suggested packages:
  cdrkit-doc pmidi fluid-soundfont-gm fluid-soundfont-gs
Recommended packages:
  cdda2wav
The following NEW packages will be installed
  faad icedax kdebase-runtime kdemultimedia-kio-plugins mp3gain mppenc
  soundkonverter speex timidity timidity-daemon
0 upgraded, 10 newly installed, 0 to remove and 0 not upgraded.
Need to get 1,655 kB of archives.
After this operation, 4,972 kB of additional disk space will be used.
Do you want to continue [Y/n]?
Get:1 http://gb.archive.ubuntu.com/ubuntu/ precise/universe faad i386 2.7-7 [36.0 kB]
Get:2 http://gb.archive.ubuntu.com/ubuntu/ precise/universe icedax i386 9:1.1.11-2ubuntu2 [166 kB]
Get:3 http://gb.archive.ubuntu.com/ubuntu/ precise-updates/main kdebase-runtime all 4:4.8.4-0ubuntu0.1 [9,118 B]
Get:4 http://gb.archive.ubuntu.com/ubuntu/ precise-updates/main kdemultimedia-kio-plugins i386 4:4.8.4-0ubuntu0.1 [87.8 kB]
Get:5 http://gb.archive.ubuntu.com/ubuntu/ precise/universe mp3gain i386 1.5.2-r2-2 [66.5 kB]
Get:6 http://gb.archive.ubuntu.com/ubuntu/ precise/universe mppenc i386 1.16-1 [60.8 kB]
Get:7 http://gb.archive.ubuntu.com/ubuntu/ precise/universe soundkonverter i386 0.9.94-2 [584 kB]
Get:8 http://gb.archive.ubuntu.com/ubuntu/ precise/universe speex i386 1.2~rc1-3ubuntu2 [24.9 kB]
Get:9 http://gb.archive.ubuntu.com/ubuntu/ precise/universe timidity i386 2.13.2-40build2 [614 kB]
Get:10 http://gb.archive.ubuntu.com/ubuntu/ precise/universe timidity-daemon all 2.13.2-40build2 [5,996 B]
Fetched 1,655 kB in 1s (1,027 kB/s)
Selecting previously unselected package faad.
(Reading database ... 312714 files and directories currently installed.)
Unpacking faad (from .../archives/faad_2.7-7_i386.deb) ...
Selecting previously unselected package icedax.
Unpacking icedax (from .../icedax_9%3a1.1.11-2ubuntu2_i386.deb) ...
Selecting previously unselected package kdebase-runtime.
Unpacking kdebase-runtime (from .../kdebase-runtime_4%3a4.8.4-0ubuntu0.1_all.deb) ...
Selecting previously unselected package kdemultimedia-kio-plugins.
Unpacking kdemultimedia-kio-plugins (from .../kdemultimedia-kio-plugins_4%3a4.8.4-0ubuntu0.1_i386.deb) ...
Selecting previously unselected package mp3gain.
Unpacking mp3gain (from .../mp3gain_1.5.2-r2-2_i386.deb) ...
Selecting previously unselected package mppenc.
Unpacking mppenc (from .../mppenc_1.16-1_i386.deb) ...
Selecting previously unselected package soundkonverter.
Unpacking soundkonverter (from .../soundkonverter_0.9.94-2_i386.deb) ...
Selecting previously unselected package speex.
Unpacking speex (from .../speex_1.2~rc1-3ubuntu2_i386.deb) ...
Selecting previously unselected package timidity.
Unpacking timidity (from .../timidity_2.13.2-40build2_i386.deb) ...
Stopping old timidity because of location change..
 * Server user does not exist. Aborting [ OK ]
invoke-rc.d: initscript timidity, action "stop" failed.
dpkg: error processing /var/cache/apt/archives/timidity_2.13.2-40build2_i386.deb (--unpack):
 subprocess new pre-installation script returned error exit status 1
Selecting previously unselected package timidity-daemon.
Unpacking timidity-daemon (from .../timidity-daemon_2.13.2-40build2_all.deb) ...
Processing triggers for man-db ...
Processing triggers for bamfdaemon ...
Rebuilding /usr/share/applications/bamf.index...
Processing triggers for desktop-file-utils ...
Processing triggers for gnome-menus ...
Processing triggers for hicolor-icon-theme ...
Processing triggers for ureadahead ...
ureadahead will be reprofiled on next reboot
Errors were encountered while processing:
 /var/cache/apt/archives/timidity_2.13.2-40build2_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
azed@azed-N110:~$

And so what am I left with? timidity-daemon came up as "broken" in synaptic, but I used the latter to fix it, and now it registers as installed,, as do soundkonverter, and almost all of the major dependencies listed above. The only problem is timidity, which shows up as being marked for installation, yet when I try to install it I get the error message:

E: /var/cache/apt/archives/timidity_2.13.2-40build2_i386.deb: subprocess new pre-installation script returned error exit status 1

Hitting the "details" switch brings forth:

(Reading database ... 312862 files and directories currently installed.)
Unpacking timidity (from .../timidity_2.13.2-40build2_i386.deb) ...
Stopping old timidity because of location change..
 * Server user does not exist. Aborting [ OK ]
invoke-rc.d: initscript timidity, action "stop" failed.
dpkg: error processing /var/cache/apt/archives/timidity_2.13.2-40build2_i386.deb (--unpack):
 subprocess new pre-installation script returned error exit status 1
No apport report written because MaxReports has already been reached
                                                                    Errors were encountered while processing:
 /var/cache/apt/archives/timidity_2.13.2-40build2_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install. Trying to recover:
dpkg: dependency problems prevent configuration of timidity-daemon:
 timidity-daemon depends on timidity (>= 2.13.2-40build2); however:
  Package timidity is not installed.
dpkg: error processing timidity-daemon (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 timidity-daemon

Any help anyone can offer to resolve this problem will be very gratefully received. I really want to finish installing timidity, so I can get rid of it - and soundkonverter.

ProblemType: Package
DistroRelease: Ubuntu 12.04
Package: timidity (not installed)
ProcVersionSignature: Ubuntu 3.2.0-29.46-generic-pae 3.2.24
Uname: Linux 3.2.0-29-generic-pae i686
ApportVersion: 2.0.1-0ubuntu12
Architecture: i386
Date: Fri Sep 7 10:42:05 2012
ErrorMessage: subprocess new pre-installation script returned error exit status 1
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Release i386 (20120423)
SourcePackage: timidity
Title: package timidity (not installed) failed to install/upgrade: subprocess new pre-installation script returned error exit status 1
UpgradeStatus: No upgrade log present (probably fresh install)

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu timidity Edit question
Assignee:
No assignee Edit question
Solved by:
Stephen Hamer
Solved:
Last query:
Last reply:
Revision history for this message
Stephen Hamer (stephen-hamer-uk) said :
#1

It seems to me that the backstory related about my timidity problem may be quite irrelevant; other users have also reported similar problems installing timidity. Looking at the terminl o/p for the attempted install, it seems that a certain pre-installation script has failed to run properly, causing the timidity install to abort. And then, because timidity is a dpendency for timidity-daemon, this latter can't install either. Anyone come across this before? And is there a simple fix?

Revision history for this message
Stephen Hamer (stephen-hamer-uk) said :
#2

Sorry, false alarm folks. Tried to solve the problem by uninstalling timidity-daemon. This seemed to have worked, but I still couldn't install timidity. Booted into 12.04 again this evening and had another look at timidity-daemon in synaptic. I noticed that the “completely remove” option was still highlighted even though the package was displaying as not installed. Marked it to be completely removed, and hit apply. No error messages and no problems. Then I tried installing timidity from a terminal, and the install went as smooth as silk:

azed@azed-N110:~$ sudo apt-get install timidity
[sudo] password for azed:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  python-pyquery libkeybinder0 python-keybinder
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  timidity-daemon
Suggested packages:
  pmidi fluid-soundfont-gm fluid-soundfont-gs
The following NEW packages will be installed
  timidity timidity-daemon
0 upgraded, 2 newly installed, 0 to remove and 13 not upgraded.
Need to get 0 B/620 kB of archives.
After this operation, 1,509 kB of additional disk space will be used.
Do you want to continue [Y/n]?
(Reading database ... 312858 files and directories currently installed.)
Unpacking timidity (from .../timidity_2.13.2-40build2_i386.deb) ...
Selecting previously unselected package timidity-daemon.
Unpacking timidity-daemon (from .../timidity-daemon_2.13.2-40build2_all.deb) ...
Processing triggers for man-db ...
Processing triggers for ureadahead ...
Setting up timidity (2.13.2-40build2) ...
Setting up timidity-daemon (2.13.2-40build2) ...
Adding group timidity....done
Adding system user timidity....done
Adding user `timidity' to group `audio' ...
Adding user timidity to group audio
Done.
 * Stopping TiMidity++ ALSA midi emulation... No timidity found running; none killed.
                                                                         [ OK ]
 * Starting TiMidity++ ALSA midi emulation... [ OK ]
azed@azed-N110:~$

All problems solved. Ubuntu triumphs again!