4

Managed to set up SABnzb, Sickbeard and Couch Potato and all working nicely

I have a problem with Ubuntu 12.04 server. When trying to upgrade or install any package it errors and fails as below

Now updating apache2-utils ..
Installing package(s) with command apt-get -y install apache2-utils ..
Reading package lists...
Building dependency tree...
Reading state information...

The following packages will be REMOVED:
  openmediavault-omvextrasorg

The following packages will be upgraded:
  apache2-utils
1 upgraded, 0 newly installed, 1 to remove and 12 not upgraded.
1 not fully installed or removed.
Need to get 0 B/91.4 kB of archives.
After this operation, 337 kB disk space will be freed.
(Reading database ... 120507 files and directories currently installed.)
Removing openmediavault-omvextrasorg ...
/var/lib/dpkg/info/openmediavault-omvextrasorg.postrm: 23: .: Can't open /etc/default/openmediavault
dpkg: error processing openmediavault-omvextrasorg (--remove):
 subprocess installed post-removal script returned error exit status 2
Errors were encountered while processing:
 openmediavault-omvextrasorg
E: Sub-process /usr/bin/dpkg returned an error code (1)
.. install failed!

No packages were installed. Check the messages above for the cause of the error.
<-  Return to package list 

(This is from Webmin but same result if using Putty or direct on machine)

I have an HP Microserver N54L with 8Gig RAM

2 Answers 2

2

Here are some options:

  1. Precise fix: touch /etc/default/openmediavault and try again. There may be other problems you need to fix.

  2. Nuke it from orbit: rm /var/lib/dpkg/info/openmediavault-omvextrasorg.postrm

I have found that there are many .deb pre/post scripts that are written with assumptions that may not be true. My favorite one is the prerm script that assumes the daemon is still running and causes apt-get to fail when it isn't.

Edit: Looking at https://github.com/OpenMediaVault-Plugin-Developers/openmediavault-omvextrasorg/blob/master/debian/postrm I'm guessing (1) will fail. Using (2) you may need to run these commands:

/bin/rm -f /etc/apt/preferences.d/99omv-extras-org*
/bin/rm -f /etc/apt/sources.list.d/omv-extras-org-*.list
1
  • Wow I don't know what line fixed it but I ran them all and didn't see anything happen. All the pending updates have installed now so thanks very muck. I had already tried all the commands I could find by Googling and nothing worked. Was about to blitz it and start again from scratch. Thanks so much :) Commented May 14, 2014 at 22:17
-1

I have also been served, I have also been served, just need to remove the package apt-get --force-yes remove openmediavault-omvextrasorg

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.