unable to update packages: package uses Breaks; not supported in this dpkg

I had a terrible evening figuring out what happened on my server, almost every time I tried to install a new package, it ended with an error and the following message:

package uses Breaks; not supported in this dpkg

I tried to follow hints left by error message content, ie. I tried to update dpkg (sudo apt-get install dpkg), the same error! => horrible chiken and egg dilemna.

Well after researching the web for a few hours (…), I found that it is indeed a bug between two versions of dpkg and I was stuck in it. Breaking dpkg is not a good option here….

In the end, what you have to do is to force a dpkg update, despite having it suggesting/imposing-you not to perform the update.
I did it almost manually, breaking dpkg is the last thing I wanted to do.

Here are my steps:

  1. go to debian homepage (http://packages.debian.org), look for ‘dpkg’ package and go up to the download page of dpkg software, once you’ve selected the version appropriate for your own architecture (i386 in my case). Once there, right click on the download link and copy its url
  2. log into your server and download the .deb package:
    wget <url-previously-copied>

    note: for i386 architecture, you can execute “wget http://packages.debian.org/lenny/i386/dpkg/download

  3. check your download by running “md5sum dpgk*.deb” and comparing with md5sum displayed on debian download page
  4. if md5sums match, force dpkg to install the new packages using ‘–force-depends‘ option:
    sudo dpkg -i --force-depends dpkg*.deb

That’s should be ok by now.
Now that you’ve updated dpkg version, it can deal with the ‘Breaks’ that caused troubles previously.

sources

8 Comments: Trackback URL | Comments RSS

  1. Lee Teague Says:

    I just found this page after dealing with the same issue. The only difference in my case was the dpkg deb was in /var/cache/apt/archives, so I didn't even have to download it. I suspected this would work, I was just glad to see it worked for someone else first. The last thing I wanted was a broken dpkg on my system!
  2. Adam Says:

    This page just saved me a whole lot of time. As with Lee, my dpkg had already been downloaded so I just had to install it. I also had to force the xzutils and liblzma2 packages but after that it all worked fine
  3. SS Says:

    Thank you!
  4. homer Says:

    /usr/bin/dpkg: /lib/libc.so.6: version `GLIBC_2.6' not found (required by /usr/bin/dpkg) E: Sub-process /usr/bin/dpkg returned an error code (1) Can't install GLBC_2.6 without dpkg !
  5. Debser Says:

    You need to upgrade dpkg, but pay attention using force-depends. If you force packages dpending on GLIBC_2.6 into a System that hasn't this version already installed you end with broken dpkg like homer. Your need to Upgrade dpkg to a version supporting breaks and then upgrade th rest of the system. I dunno which versions is needed for that, i solved this by upgrading to lenny first, then squeeze.
  6. eriol Says:

    Hi, I had the same problem as Homer. Took me a day to find out how to get sytem to previous state: "A broken dpkg may make it impossible to install any .deb files. A procedure like the following will help you recover from this situation. (In the first line, you can replace "links" with your favorite browser command.) $ links http://http.us.debian.org/debian/pool/main/d/dpkg/ ... download the good dpkg_version_arch.deb $ su password: ***** # ar x dpkg_version_arch.deb # mv data.tar.gz /data.tar.gz # cd / # tar xzfv data.tar.gz" (source: http://www.debianhelp.co.uk/debianproblem.htm) Take care.
  7. Jake Says:

    Thank you very, very much. I had this same problem not on a server, but on my netbook. The chicken/egg aspect was rather annoying =P A few minor corrections/comments though: 1. You suggest > note: for i386 architecture, you can execute > “wget http://packages.debian.org/lenny/i386/dpkg/download“ That just downloads the ".../download" html page, not the needed .deb file listed *on* the page. Of course you meant something like "wget http://http.us.debian.org/debian/pool/main/d/dpkg/dpkg_1.14.31_i386.deb", but as currently written, some people might get a bit confused 2. You might want to update this post to refer to Squeeze now, so the wget example would use an address like "http://http.us.debian.org/debian/pool/main/d/dpkg/dpkg_1.15.8.10_i386.deb" 3. In the part where you say > "check your download by running “md5sum dpgk*.deb" you accidentally wrote "dpgk", not "dpkg" Anyway, thanks again, your post was very helpful to me.
  8. Eric Gillette Says:

    Wow, I have to say THANKS!! I am upgrading a client's server from etch to squeeze, and boy has it been an arduous process! I was having this exact problem, and was wondering if I would end up breaking dpkg on his system, until I found your page. Thanks again dude, this info was what I needed to save the day! =0)

Post a Comment

Your email is never published nor shared. You're allow to say what you want...