Synaptic is stuck - removing partially installed package?
Florian Diesch
diesch at spamfence.net
Tue Jan 30 02:37:36 UTC 2007
Chanchao <custom at freenet.de> wrote:
> Something went wrong installing an application.
>
> Result is that I can't use Synaptic or apt-get for anything anymore, not
> even removing that package!!
>
> This is what happens:
>
> $ sudo apt-get remove virtualbox
> Reading package lists... Done
> Building dependency tree
> Reading state information... Done
> E: The package virtualbox needs to be reinstalled, but I can't find an
> archive for it.
>
> And that's it... I'm stuck. Also Automatic Updates don't work anymore.
>
> I've done a search and followed some suggestions on options to use with
> dpkg, like this below, but again with the same result.
>
> Any clues?
> sudo dpkg --remove --force-remove-reinstreq virtualbox
> dpkg - warning, overriding problem because --force enabled:
> Package is in a very bad inconsistent state - you should
> reinstall it before attempting a removal.
> (Reading database ... 109242 files and directories currently installed.)
> Removing virtualbox ...
> (Kernel module not found)...fail!
> invoke-rc.d: initscript virtualbox, action "stop" failed.
I guess /etc/init.d/virtualbox fails to unload a kernel module. If you
know a little bit about shell programming you may fix it. A quick&dirty
solution is to just insert a line
exit 0
right after the line starting with #!
> dpkg: error processing virtualbox (--remove):
> subprocess pre-removal script returned error exit status 1
> -e
> Creating group 'vboxusers'. VM users must be member of that group!
>
> No precompiled module for this kernel found -- trying to build one
Here you need to edit
/var/lib/dpkg/info/virtualbox.prerm
to not try to build a kernel module when called with the --remove option
(which seem to be stupid anyway). If you need help please post the
script (if it is to big to be posted here put it somewhere on the web).
Again a quick&dirty solution is to insert an "exit 0" line as
above. This would certainly leave some traces of the package so I do not
recommend it.
Florian
--
<http://www.florian-diesch.de/>
More information about the ubuntu-users
mailing list