Intro
When performing an upgrade of Ubuntu 10.04 to 12.04 I experienced some serious issues with the python-minimal package that are described in the following bug. What I can only add is that none of the solutions provided there work as there's another issue with the libnih-dbus1 package. Searching for a solution in the Internet results in dozens of blogs written by desperate people that experienced the same issue and had to reinstall their boxes on a new LTS from scratch. I have managed to bypass those issues anyway. The following steps describe a detailed troubleshooting process both with a solution.
Symptoms
- During the regular upgrade process, when running the following command:
apt-get dist-upgrade
the following error message is being displayed:
E: Could not perform immediate configuration on 'python-minimal'.Please see man 5 apt.conf under APT::Immediate-Configure for details. (2)
- When running the following command:
apt-get install -o APT::Immediate-Configure=false -f apt python-minimal
as suggested on the following website another error message is being displayed:
E: Couldn't configure pre-depend multiarch-support for libnih-dbus1, probably a dependency cycle.
Solution
Please, run the following sequence of commands:
- uname -r - you'll need to know your kernel version, e.g.:
3.2.0-23-generic-pae
- apt-get remove libnih-dbus1 - please, note down all the packages that are going to be removed, except of any linux-image packages e.g.:
The following packages will be REMOVED:
apache2 apache2-mpm-worker apache2.2-common bsd-mailx console-setup cron dkms dmsetup e2fsprogs eject grub grub-common hostname ifupdown
initramfs-tools initscripts kbd libc6-i686 libdevmapper1.02.1 libnih-dbus1 libsasl2-modules logrotate module-init-tools mountall nagios-plugins
nagios-plugins-basic nagios-plugins-standard netbase ntp ntpdate open-vm-dkms openssh-server plymouth postfix procps udev upstart ureadahead
util-linux
- Yes, do as I say!
- apt-get install ubuntu-minimal
- apt-get install [list of packages from point 2] - install back automatically uninstalled packages from point 2
- answer N for any of the questions regarding configuration files, e.g.:
Configuration file `/etc/ntp.conf'
==> Modified (by you or by a script) since installation.
==> Package distributor has shipped an updated version.
What would you like to do about it ? Your options are:
Y or I : install the package maintainer's version
N or O : keep your currently-installed version
D : show the differences between the versions
Z : start a shell to examine the situation
The default action is to keep your current version.
*** ntp.conf (Y/I/N/O/D/Z) [default=N] ? N
- apt-get install linux-image-[version from point 1] - install Linux kernel (sometimes I need to rung that command twice)
- apt-get install -o APT::Immediate-Configure=false -f apt python-minimal
- apt-get dist-upgrade
- follow the regular on-screen instructions to accomplish the upgrade process
- apt-get autoremove
- reboot
Notes
Issues described in the above posts are not the only ones that I encountered when upgrading my Ubuntu 10.04 servers to 12.04. Please, take a look on the following post describing similar issues both with the troubleshooting process and the solution:
Very useful, thanks :)
ReplyDeleteThis has been way more helpful than that Bug report that got "Invalidated" by the devs because they were unable to reproduce this, yet it's still giving people headaches. Classy...
ReplyDeleteThank you for helping out! :)
Actually just installing ubuntu-minimal worked for me. This bug happens when ubuntu-minimal has been removed before you upgrade.
ReplyDeleteActually, instead of using "apt-get remove" to perform the (dangerous and error-prone) removal of many essential packages, you can choose a less dangerous was of fixing the problem:
ReplyDelete#> # if you have dpkg-repack, just to be on the safe side
#> dpkg-repack libnih-dbus1
#> dpkg -P --force-depends libnih-dbus1
#> apt-get -f install
#> apt-get install -o APT::Immediate-Configure=false -f apt python-minimal
#> # rest like above