I 'accedentley' installed a wheezy package (by including the source in my sources.list) to a squeeze system. For the last few days I've been trying to restore it but I have no luck.

Here is the problem:

The following packages have unmet dependencies:
 build-essential : Depends: libc6-dev but it is not going to be installed or
                   Depends: g++ (>= 4:4.4.3) but it is not going to be installed
                   Depends: dpkg-dev (>= 1.13.5) but it is not going to be installed
 locales : Depends: glibc-2.13-1 but it is not installable
 multiarch-support : Depends: libc6 (>= 2.13-5) but 2.11.3-4 is to be installed

What did I try:

  • apt-get -f install
  • clean / purge old packages
  • tried to lookup the appropriate versions and install manually, but I don't know how to be sure I have the correct version
  • restored glibc from /var/cache/apt/archives/ (as stated here Wrong libc6 version in Debian Squeeze -- can I go back?)
  • tried using aptitude (you need to remove this 100 or so packages, so that's a no-go)
  • created apt preferences with priority settings for squeeze

Also lots of other stuff found in the internet but nothing seems to match my situation and provides me with any useful thing to go with.

So: is there any way to see what wheezy packages are installed, remove them and re-install the appropriate squeeze packages instead?

My linux version

root@vps:~# uname -a
Linux vps 2.6.32-042stab068.8 #1 SMP Fri Dec 7 17:06:14 MSK 2012 i686 GNU/Linux

Any leads would be much appreciated!

UPDATE 23/08

If I execute

apt-cache showpkg g++

This is the response:

root@vps:~/a# apt-cache showpkg g++
Package: g++
4:4.4.5-1 (/var/lib/apt/lists/ftp.debian.org_debian_dists_squeeze_main_binary-i386_Packages) (/var/lib/dpkg/status)
 Description Language:
                 File: /var/lib/apt/lists/ftp.debian.org_debian_dists_squeeze_main_binary-i386_Packages
                  MD5: abf7a21a88a8ba95858d401b8ca23b7c

To me it seems the correct version is installed? But why is g++ listed as an error?

edit 24/08:

I've upgraded my entire system to wheezy, the only option left for me to try, so far so good :)

1 Answer 1

  • You can check the different versions available for a package using:

    apt-cache showpkg <package-name>

    If you find the version you are looking for there, you can try:

    # apt-get install <package-name>=<package-version-number>

    ...to get the older version.

  • If you want to use the release name to get the correct package, then:

    apt-get -t=<target release> install <package-name>
  • Thanks but when I (for example) check on g++ (one of the packages reported in the error) I get this as output: <edit see main question>
    – Matthijs
    Aug 23, 2014 at 14:26
  • Just thinking of this: would it be better to just upgrade to wheezy?
    – Matthijs
    Aug 23, 2014 at 14:29
  • Just to let you know, I decided to upgrade to wheezey, so far everything works like a charm :)
    – Matthijs
    Sep 17, 2014 at 14:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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