Ubuntu

apt-get broken after upgrade to edgy eft (courier-authdaemon package)

Reported by Wesley Stessens on 2006-10-07
50
Affects Status Importance Assigned to Milestone
apt (Ubuntu)
High
Michael Vogt
courier-authlib (Ubuntu)
High
Unassigned
Edgy
Undecided
Unassigned

Bug Description

Binary package hint: courier-authdaemon

My friend recently upgraded to Edgy Eft (6.10) and has encountered a problem with the courier-authdaemon package. It doesn't want to upgrade or remove and (dist-)upgrade also doesn't work anymore because it tells us to -f install first, but as you can see below, that just causes more errors.

I ssh'ed into my friends computer to try and fix the problem, but it seems like something is horribly broken. See here:

*** -f install ***

1 pieterjan@ubuntuX $ LC_ALL=C sudo apt-get -f install
Reading package lists... Done
Building dependency tree... Done
Correcting dependencies... Done
The following extra packages will be installed:
  courier-authdaemon courier-authlib
The following NEW packages will be installed:
  courier-authlib
The following packages will be upgraded:
  courier-authdaemon
1 upgraded, 1 newly installed, 0 to remove and 493 not upgraded.
1 not fully installed or removed.
Need to get 0B/83.9kB of archives.
After unpacking 164kB of additional disk space will be used.
Do you want to continue [Y/n]?
dpkg: error processing courier-authdaemon (--remove):
 Package is in a very bad inconsistent state - you should
 reinstall it before attempting a removal.
terminate called after throwing an instance of 'std::logic_error'
  what(): basic_string::_S_construct NULL not valid
Aborted
2 pieterjan@ubuntuX $ Errors were encountered while processing:
 courier-authdaemon

*** dist-upgrade ***

8 pieterjan@ubuntuX $ LC_ALL=C sudo apt-get dist-upgrade Reading package lists... Done
Building dependency tree... Done
You might want to run `apt-get -f install' to correct these.
The following packages have unmet dependencies:
  courier-authdaemon: Depends: courier-base (>= 0.47) but it is not installed
E: Unmet dependencies. Try using -f.

*** install courier-base and its deps ***

10 pieterjan@ubuntuX $ LC_ALL=C sudo apt-get install courier-base courier-authlib courier-authlib-userdb
Reading package lists... Done
Building dependency tree... Done
You might want to run `apt-get -f install' to correct these:
The following packages have unmet dependencies:
  courier-authlib: Conflicts: courier-authdaemon (< 0.58) but 0.47-13ubuntu5.1 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

*** policy courier-authdaemon ***

12 pieterjan@ubuntuX $ LC_ALL=C apt-cache policy courier-authdaemon
courier-authdaemon:
  Installed: 0.47-13ubuntu5.1
  Candidate: 0.58-4ubuntu1
  Version table:
     0.58-4ubuntu1 0
        500 http://be.archive.ubuntu.com edgy/universe Packages
 *** 0.47-13ubuntu5.1 0
        500 http://security.ubuntu.com dapper-security/main Packages
        100 /var/lib/dpkg/status
     0.47-13ubuntu5 0
        500 http://archive.ubuntu.com dapper/main Packages

Wesley Stessens (wesley) wrote :

Manual remove of the package also doesn't work (you could already see that in apt-get -f install)

*** remove ***

13 pieterjan@ubuntuX $ LC_ALL=C sudo apt-get remove courier-authdaemon
Reading package lists... Done
Building dependency tree... Done
The following packages were automatically installed and are no longer required:
  courier-authdaemon
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
  courier-authdaemon
0 upgraded, 0 newly installed, 1 to remove and 493 not upgraded.
1 not fully installed or removed.
Need to get 0B of archives.
After unpacking 201kB disk space will be freed.
Do you want to continue [Y/n]?
dpkg: error processing courier-authdaemon (--remove):
 Package is in a very bad inconsistent state - you should
 reinstall it before attempting a removal.
terminate called after throwing an instance of 'std::logic_error'
  what(): basic_string::_S_construct NULL not valid
Aborted
14 pieterjan@ubuntuX $ Errors were encountered while processing:
 courier-authdaemon

ouioui (ouioui) wrote :

i have exactly the same error and i can't install any other apps.
I can't upgrade more.
i'm trying lots of things during the last days.
I think the only solution is wait for another version correcting dependencies and other bugs.
I hope soon.

Wesley Stessens (wesley) wrote :

But that's not possible ?
Because dpkg / apt-get is broken !

MrHaroldA (mrharolda) wrote :

same here... even if this get fixed, can we install that fix?

Is there a way to remove courier from the installed packages list?

MrHaroldA (mrharolda) wrote :

Ok, this is how I fixed it:

1. backup /var/lib/dpkg/status to a safe location
2. remove all courier entries from /var/lib/dpkg/status (nano it, search=ctrl-w)
3. sudo apt-get upgrade
4. sudo apt-get install courier-imap

I now need to reconfigure courier, but at least it's working again!

Wesley Stessens (wesley) wrote :

That fixed my friend's system!
Thanks for sharing, HaroldAling.

Wesley Stessens (wesley) wrote :

Bug is confirmed by 2 other people in 4 days.
It is probably already fixed with the latest upgrade, but I'm not sure.

Changed in courier-authlib:
status: Unconfirmed → Confirmed
MrHaroldA (mrharolda) wrote :

np, profoX...

I ran into this a couple of minutes before posting here, so there is still a problem with the upgrade from dapper to edgy if you have courier-imap installed..

-H-

ouioui (ouioui) wrote :

thanks a lot!

rblake (rblake-gmx) wrote :

This problem caused me quite a headache today as well.

I would advise against editing the installation database, but would suggest the following:

The problem is related to the courier-authdaemon. Instead of removing the knowledge of the install system (security upgrades will be ignored!), manually remove the authdaemon:

sudo dpkg --force-remove-reinstreq -P courier-authdaemon

Then continue the upgrade as normal, if necesarry selecting the courier packages manually once the upgrade has completed.

Works perfectly now here!

Daniel Moyne (dmoyne) wrote :

I wish I had kown at the time ! ; see my comment regarding issuing warning messages when initiating the update manager.

CervantesJulio (jcervan82) wrote :

So, which is the preferred dirty fix?

Matt Zimmerman (mdz) wrote :
Changed in courier-authlib:
importance: Undecided → High
Michael Vogt (mvo) wrote :

Thanks for your bugreport.

I can reproduce the upgrade failure here on my testsystem. I'm investigating it currently.

Changed in courier-authlib:
status: Confirmed → In Progress
Michael Vogt (mvo) wrote :

It looks like authdaemond wants to exec courrierlogger which is no longer available in the latest courier-base package:

Preparing to replace courier-authdaemon 0.47-13ubuntu5.1 (using .../courier-authdaemon_0.58-4ubuntu1_i386.deb) ...
 * Stopping Courier authdaemon...
 * Stopping Courier authdaemon... /usr/lib/courier/authlib/authdaemond: line 31: /usr/sbin/courierlogger: No such file or directory
/usr/lib/courier/authlib/authdaemond: line 31: exec: /usr/sbin/courierlogger: cannot execute: No such file or directory
                                                                         [fail]
invoke-rc.d: initscript courier-authdaemon, action "stop" failed.
dpkg: warning - old pre-removal script returned error exit status 1
dpkg - trying script from the new package instead ...
/usr/lib/courier/authlib/authdaemond: line 31: /usr/sbin/courierlogger: No such file or directory
invoke-rc.d: initscript courier-authdaemon, action "start" failed.
dpkg: error while cleaning up:
 subprocess post-installation script returned error exit status 1
Selecting previously deselected package courier-authlib.
dpkg: regarding .../courier-authlib_0.58-4ubuntu1_i386.deb containing courier-authlib:
 courier-authlib conflicts with courier-authdaemon (<< 0.58)
  courier-authdaemon (version 0.47-13ubuntu5.1) is broken due to postinst failure.
dpkg: error processing /var/cache/apt/archives/courier-authlib_0.58-4ubuntu1_i386.deb (--unpack):
 conflicting packages - not installing courier-authlib

Michael Vogt (mvo) wrote :

I added a apt task for this as well because apt does not cope with the following error lines send from dpkg:

(parsed from dpkg) pkg: courier-authdaemon action: half-configured
dpkg: Fehler beim Bearbeiten von courier-authdaemon (--remove):
 Paket ist in einem sehr schlechten inkonsistenten Zustand - Sie sollten
 es erneut installieren, bevor Sie es zu entfernen versuchen.
got from dpkg 'status: courier-authdaemon : error : Paket ist in einem sehr sch
echten inkonsistenten Zustand - Sie sollten
'
send: 'pmerror:courier-authdaemon:4.54545:Paket ist in einem sehr schlechten in
onsistenten Zustand - Sie sollten
'
got from dpkg ' es erneut installieren, bevor Sie es zu entfernen versuchen.
'
terminate called after throwing an instance of 'std::logic_error'
  what(): basic_string::_S_construct NULL not valid

Program received signal SIGABRT, Aborted.
0xffffe410 in __kernel_vsyscall ()

Michael Vogt (mvo) wrote :

It turns out that the problem is TokSplitString() in pkgDpkgPM::Go(). It does return false only when max_split is reached, true otherwise. That breaks the following code.

Changed in apt:
importance: Undecided → High
status: Unconfirmed → In Progress

Bug confirmed for me too.

I had my system broken since 3 days ago, only in text terminal (no kde). I was quite pessimistic about the solution, but waited and kept searching the web, and finally found it.
Thanks for the post, that really fixed my system!

zek725 (zek725) wrote :

sudo dpkg --force-remove-reinstreq -P courier-authdaemon

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 ... 118057 files and directories currently installed.)
Removing courier-authdaemon ...
 * Stopping Courier authdaemon... exec: 31: /usr/sbin/courierlogger: not found
                                                                         [fail]
invoke-rc.d: initscript courier-authdaemon, action "stop" failed.
dpkg: error processing courier-authdaemon (--purge):
 subprocess pre-removal script returned error exit status 1
 * Starting Courier authdaemon... exec: 31: /usr/sbin/courierlogger: not found
                                                                         [fail]
invoke-rc.d: initscript courier-authdaemon, action "start" failed.
dpkg: error while cleaning up:
 subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
 courier-authdaemon

Fedearne (mtt) wrote :

I had the same problem as zek725.

It seems that the package is not installed and abviously can not be stooped.

My solution was to create an empty courierlogger file :

touch /usr/sbin/courierlogger
chmod +x /usr/sbin/courierlogger

also the /var/run/courier dir must be made empty. I only had a subdir nammed calendar, which i removed.

rmdir /var/run/courier/calendar/

After this i could install courier-authlib, do a 'install -f' and complete the upgrade.

apt-get install courier-authlib
apt-get install -f
apt-get dist-upgrade

Maybe this can help You zek

Michael Vogt (mvo) wrote :
Changed in apt:
assignee: nobody → mvo
Peter Petersson (peter-pmb) wrote :

Thanks Fedearne

I finally got rid of the problem but 'install -f' did not work for me I had to do a 'sudo dpkg --force-remove-reinstreq -P courier-authdaemon'.

Now I only have to get it back again after I have completed the upgrade.

Having been using debian and lately Ubuntu for about 10 years this is probably the messiest state I have had for a server upgrade ever but it is nice to see that the openness and community is there to support you (as always) ;).

Steven Harms (sharms) on 2006-11-01
Changed in courier-authlib:
status: Unconfirmed → Confirmed
Russel Winder (russel) wrote :

Maybe I am just seriously irritated presently having been hit by this problem but I recollect there was a message saying there was going to be an issue with courier-authdaemon during the early stages of the upgrade so why couldn't there have been a message telling me how to get round the problem.

This problem should have been fixed before release, it was clearly known about or the message would not have been printed.

Growl.

blib (blibak) wrote :

I encountered this problem today. When trying:

sudo dpkg --force-remove-reinstreq -P courier-authdaemon

I get:
dpkg: dependency problems prevent removal of courier-authdaemon:
 courier-imap depends on courier-authdaemon (>= 0.47); however:
  Package courier-authdaemon is to be removed.
dpkg: error processing courier-authdaemon (--purge):
 dependency problems - not removing
Errors were encountered while processing:
 courier-authdaemon

blib (blibak) wrote :

Ok, thanks to this recipe (http://ubuntuforums.org/showthread.php?t=284950), I think I fixed this mess. Basically, first run the dpkg -i command to figure out the depends, then ignore them using the --ignore-depends option:

sudo dpkg -i courier-base_0.53.2-3ubuntu1_i386.deb
sudo dpkg --ignore-depends= libfam0,libgamin0,libgdbm3,perl,courier-authlib,courier-authlib-userdb,courier-authdaemon -i courier-base_0.53.2-3ubuntu1_i386.deb

sudo dpkg -i locales_2.3.22_all.deb
sudo dpkg --ignore-depends=belocs-locales-bin,tzdata -i locales_2.3.22_all.deb

sudo dpkg --force-conflicts -i courier-authlib_0.58-4ubuntu1_i386.deb
sudo dpkg --force-conflicts --ignore-depends=libltdl3 -i courier-authlib_0.58-4ubuntu1_i386.deb

sudo dpkg -i courier-authdaemon_0.58-4ubuntu1_i386.deb

sudo apt-get -f install

And voila, the "Setting up .."'s start rolling.

bristleburger (spr) wrote :

I upgraded two machines from Dapper to Edgy using gksu "update-manager -c" without any problems. Courier-imap and courier-maildrop were installed on both machines.

But this bug struck when upgrading a third machine.

Fixed as follows:
1. backup /var/lib/dpkg/status to a safe location
2. remove all courier entries from /var/lib/dpkg/status
3. sudo apt-get upgrade
4. sudo apt-get install courier-imap
5. sudo apt-get install courier-maildrop

I am very grateful to HaroldAling for posting details of this fix – I would have been in big trouble without it.

I subsequently upgraded two more machines without any trouble by removing all courier packages before the upgrade and then restoring them again once 6.10 was up and running.

All machines are x86 based apart from one Athlon machine which was the one that the bug struck. I'm not sure if the type of CPU is relevant. All machines were loaded with the same configuration of 6.06 packages.

unsubscribing Ubuntu Sponsors for universe from this, as this appears to be a main patch, and mvo is assigned to upload it.

Daniel Hahler (blueyed) wrote :

The fix/patch seems to have been applied to Gutsy's apt already (apt 0.7.6ubuntu8).

Changed in apt:
status: In Progress → Fix Released

Hi guys, I am having a similar problem I am wondering if you can assist. I have no access to apt, or any of the other update and install managers, they are all telling me the same thing.

E: The package mfc9180lpr needs to be reinstalled, but I can't find an archive for it.
E: Internal error opening cache (1). Please report.

This happened when I was downloading a package from Brother to install the driver for my Printer.

Please help... I am not able to access any updates.

Cheers

Olivier Prieur (mumbly) wrote :

I've been struggling a few months ago to upgrade from dapper to Edgy as the courier-authdaemon was "anoying" me ...
And now i tried the bristleburger's solution to upgrade from edgy to feistywith no result !
I still have this error :
$sudo update-manager -c
Warning : could not initiate dbus
Warning: Upgradable but no candidateOrigine?!?: courier-authdaemon

What am i supposed to do ???

Daniel Hahler (blueyed) wrote :

Is this still a problem with courier-authlib in Hardy? (It has been set to "In progress" by Michael)

lordbyron, your problem appears to be something different. Please file a new bug if the problem still exists.

Olivier, the bug has been fixed (in apt) for Gutsy, so it would require a StableReleaseUpdate (http://wiki.ubuntu.com/SRU) for any supported release before that.

Brian Murray (brian-murray) wrote :

Edgy has reached its end of life and this particular bug task for Edgy is no longer something that will be fixed.

Changed in courier-authlib:
status: Confirmed → Won't Fix
Michael Vogt (mvo) on 2008-07-25
Changed in courier-authlib:
status: In Progress → New
David Wynn (wynn-david) wrote :

As noted, this bug is specific to upgrading from Dapper to Edgy. As Edgy has reached end of life, I am closing this bug.

Changed in courier-authlib:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers