Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm trying to update from debian lenny to squeeze on my 64bit root server and did the following so far:

  • modifying sources.list
  • apt-get update
  • apt-get upgrade
  • apt-get install linux-image-2.6-amd64

The last step leads to the following error-output:

Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
   linux-image-2.6-amd64: Depends: linux-image-2.6.32-5-amd64 but it is not going to be installed
E: Broken packages

UPDATE

here's my sources.list

deb     ftp://mirror.hetzner.de/debian/packages  squeeze          main contrib non-free
deb     ftp://mirror.hetzner.de/debian/security  squeeze/updates  main contrib non-free

deb     http://ftp.de.debian.org/debian  squeeze  main non-free contrib
deb-src http://ftp.de.debian.org/debian  squeeze  main non-free contrib

deb     http://security.debian.org/  squeeze/updates  main contrib non-free
deb-src http://security.debian.org/  squeeze/updates  main contrib non-free

UPDATE 2

I could also run

aptitude upgrade

but am unsure if that's a good idea, it suggests

....

74 packages upgraded, 111 newly installed, 16 to remove and 0 not upgraded.

....

Remove the following packages: libept0 linux-image-2.6-amd64 php5-mysql

Install the following packages: libsasl2-modules [2.1.23.dfsg1-7 (stable, stable)]

...

UPDATE 3

apt-get -s dist-upgrade returns:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Failed
The following packages have unmet dependencies:
  udev: Breaks: linux-image-2.6-amd64 (< 2.6.28) but 2.6.26+17+lenny1 is to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

and apt-get upgrade tells me it holds back a lot:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages have been kept back:
  apache2-mpm-prefork apache2.2-common apt aptitude bash cron diff djvulibre-desktop exim4 exim4-base exim4-config exim4-daemon-light
  gettext ghostscript gnupg gpgv grub grub-common imagemagick iproute iptables lftp libapache2-mod-php5 libaprutil1 libcups2
  libcupsimage2 libcurl3 libdate-manip-perl libdevmapper1.02.1 libdjvulibre21 libgs8 libgtk2.0-0 libgtk2.0-bin libkrb5-dev libkrb53
  libpam-modules libpam-runtime libpango1.0-0 libpango1.0-dev libphp-pclzip libpq5 librsvg2-2 libsasl2-2 libthai-data libthai0
  libx11-6 libx11-dev libxcb1 libxcb1-dev libxi6 linux-image-2.6-amd64 lvm2 munin-node openssh-client openssh-server php5-common
  php5-gd php5-imagick php5-mysql python python-minimal python2.5 python2.5-minimal rrdtool smartmontools sysv-rc udev
0 upgraded, 0 newly installed, 0 to remove and 67 not upgraded.

Then I thought maybe something is on hold, but

dpkg --get-selections | grep hold

returns nothing.

Before all this I installed a lot of things over the last ~2 years, that machine had been running. I remember having some issues with munin recently, where I needed to modify the apt-sources to retrieve version 1.4.7. I might have gotten some squeeze packages there as well?

What seems to be strange: If I check /etc/debian_version it says: 6.0.5

Also I read it is not a good idea to use aptitude now, or say: not to mix aptidute usage and apt-get usage. I probably used also aptitude occassinaly in the past.

Update 4

I tried to install linux-image-2.6.32-5-amd64 as stew said, but that failed as well

Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
  linux-image-2.6.32-5-amd64: Depends: linux-base (>= 2.6.32-45) but it is not going to be installed
E: Broken packages

do I understand that message correctly? If I wanna install 2.6.32-5 I need a version >= 2.6.32-45 how should that work?

Update 5

so I kept on recursing, meaning: trying to install those dependecies which led to:

  • linux-base
  • libuuid-perl
  • perlapi-5.10.1

the last one, can't be installed because it's a 'virtual package'

Package perlapi-5.10.1 is a virtual package provided by:
You should explicitly select one to install.
E: Package perlapi-5.10.1 has no installation candidate

there I got stucked again. apt-cache search perlapi just returned two packages. libperl-apireference-perl depends back to perlapi-5.10.1 and perl-base claims to be at the newest version

Update 6

looks like I've got perl 5.14.2 installed. That ist unstable, if I'm not mistaken. As far as I understand, downgrading would solve this issue, right?

So I downgraded to perl 5.10 from the debian archive. Running apt-get upgrade now, I am confused if that is the right way since there'll be many changes

11 upgraded, 26 newly installed, 76 to remove and 44 not upgraded.

Some of the to-be-removed packages look important for what I'm doing, e.g. php5-mysql munin munin-common munin-node

Is this a good way to choose and then try to fix all those packages/services afterwards?

Update 7

nice! I'm getting there

aptitude install perl 

downgraded many other packages as well. then running apt-get upgrade did not cause any trouble any more and I moved on to

apt-get dist-upgrade

which finally ran through fine.

Thanks a lot, especially to stew!

share|improve this question
    
you can search for which package provides perlapi-5.10.1 with aptitude search '~Pperlapi-5.10.1' or aptitude search '?provides(perlapi-5.10.1)' and find out that its perl-base –  stew Jun 1 '12 at 16:18
    
perl 5.14 added update 6 above. –  Daniel Jun 1 '12 at 16:30
    
The fact that you have perl 5.14 installed is worrysome, as it means someone was mixing unstable packages into your stable install, which is rarely a good idea. You absolutely don't want to remove perl-base, as it is a package marked as Priority:Required and Essential:yes. Since dpkg itself relies on perl, you would render your package management system useless. instead, you can downgrade a package by running apt-get install packagename=version. in this case apt-get install perl-base=5.10.1-17squeeze3. You might have to specify exact versions of multiple package to get this to work –  stew Jun 1 '12 at 16:47
    
and these complex dependency problems are where aptitude shines as having better dependency resolution. you might try getting this part of the upgrade done with aptitude –  stew Jun 1 '12 at 16:48
    
just rewrote my update while you were writing as well. and am running aptitude install perl now which suggested basicly some downgrade changes... –  Daniel Jun 1 '12 at 16:51

2 Answers 2

up vote 2 down vote accepted

It seems you started off with the recommended procedure for upgrading which is great. I recommend trying to stick to that instead of prematurely doing a dist-upgrade. This procedure is worked out by testing on thousands of systems and is what we think is your best chance of a smooth upgrade.

In this case when you are doing apt-get upgrade we are EXPECTING lots of packages to be held back. That is by design. We want to do just a minimal upgrade in order to get the new kernel and udev installed, then reboot, then do the rest of the upgrade with dist-upgrade.

You should be concentrating on this error:

linux-image-2.6-amd64: Depends: linux-image-2.6.32-5-amd64 but it is not going to be installed

There is some reason why apt doesn't want to install linux-image-2.6.32-5-amd64. Find out by trying to install it directly with apt-get install linux-image-2.6.32-5-amd64, That will either install it, or will tell you specifically what is wrong with this package. When this results in a problem with another package, do the same with this package, by trying to install it directly, until you reach a root cause. Once the kernel is successfully installed, proceed with the upgrade instructions from there.

One artifact that doing this will have which may be undesired is marking the linux-image-2.6.32-5-amd64 package as automatically installed. After the upgrade is complete, and you are happy with the results, you might run apt-mark auto linux-image-2.6.32-5-amd64 to mark this package as automatically installed.

The reason that /etc/debian_version reads 6.0.5 is that you already update the base_files package. This is not a surpise.

The problems with mixing aptitude and apt-get were resolved with apt-get version 7.0 a few years ago, you should feel free to mix their use at will. In fact, Debian recommended aptitude for upgrading from one major release to another in the past and now recommends apt-get, so clearly Debian is recommending using both. We will recommend whichever one seems to work better for a given upgrade. On the lenny->squeeze upgrade, aptitude tends to think "too hard" about finding an optimal upgrade path, and the more simple dependency resolution in apt-get works for more people.

share|improve this answer
    
thx. just updated again. –  Daniel Jun 1 '12 at 15:46

From major version to another upgrading requires you to do this:

apt-get update
apt-get dist-upgrade

Nothing more. Yeah, replacing the distro name from /etc/apt/sources.list, for example sed -i -e 's/lenny/squeeze/g' /etc/apt/sources.list.

But your mistake seems to be using upgrade instead of dist-upgrade.

Also, in case something goes wrong, you have backups, right?

share|improve this answer
1  
+1 "Also, in case something goes wrong, you have backups, right?" –  SvW Jun 1 '12 at 10:35
    
yeah, tried that before. That leads to: Reading package lists... Done Building dependency tree Reading state information... Done Calculating upgrade... Failed The following packages have unmet dependencies: udev: Breaks: linux-image-2.6-amd64 (< 2.6.28) but 2.6.26+17+lenny1 is to be installed E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages. –  Daniel Jun 1 '12 at 10:35
    
lenny? You still have something old in your sources.list. Paste /etc/apt/sources.list to your original question, please. –  Janne Pikkarainen Jun 1 '12 at 10:37
    
done. see above, also I made sure there is nothing sources.list.d/ –  Daniel Jun 1 '12 at 10:46
    
don't know who voted for this answer. The problem remains Unsolved! –  Daniel Jun 1 '12 at 13:14

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.