apt-cache show shows various versions of the package

# apt-cache show libc6:i386
Package: libc6
Version: 2.17-97
Architecture: i386

Package: libc6
Status: install ok installed
Version: 2.17-7
Architecture: i386
Multi-Arch: same

Package: libc6
Version: 2.13-38
Architecture: i386

# apt-get show libc6:amd64
Package: libc6
Version: 2.17-97
Architecture: amd64

Package: libc6
Version: 2.13-38
Architecture: amd64

But how to map a package version to release codename like stable/testing/unstable?

[XY problem note] - what I try to to and what happens:

Trying bootstrap my i386 debian to also run amd64 binaries (keeping i386 as primary arch),

  • As a first step in trying the new amd64 world, I tried to run a program,
  • It failed to find libssl.so.1.0.0,
  • I tried to install libssl1.0.0:amd64,
  • got stopped by libgcc1 incompatibility,
  • tried installing libgcc1:amd64, got errors about incompatibility,
  • upgraded the system to more recent packages (such as apt-get upgrade shows zeroes),
  • forcibly upgraded i386 libgcc-related packages by installing with explicit versions specified (apt-get install libstdc++6=4.8.2-1 gcc-4.8-base=4.8.2-1 libgcc1=1:4.8.2-1 libgfortran3=4.8.2-1 libquadmath0=4.8.2-1 libgcc-4.8-dev=4.8.2-1 libgomp1=4.8.2-1 libitm1=4.8.2-1 libatomic1=4.8.2-1 libasan0=4.8.2-1 libstdc++-4.8-dev=4.8.2-1)
  • tried installing libgcc1:amd64, got less errors comparing to before, but still stopped by absence of libc6:amd64,
  • tried installing libc6:amd64, got stopped by massive incompatibilities,
  • found (according to apt-cache info) that for "my" i386 version of libc6 there's currently no corresponding amd64 version available.
  • Confused by various versions: which is still from "squeeze" (too old), which is from "sid" (available only for manual installation, not for upgrading). Why there's no "my" version of a library even though I just upgraded fully?..

[/XY problem note]

Update Tried apt-cache policy:

# apt-cache policy libc6:i386
  Installed: 2.17-7
  Candidate: 2.17-7
  Version table:
     2.17-97 0
         10 http://ftp.de.debian.org/debian/ sid/main i386 Packages
         10 http://ftp.mgts.by/debian/ testing/main i386 Packages
 *** 2.17-7 0
        100 /var/lib/dpkg/status
     2.13-38 0
        900 http://ftp.mgts.by/debian/ wheezy/main i386 Packages

Looks like my libc6 is something in-between.

  • Unless there is a critical piece of information I don't know, an AMD64 binary will NEVER run on an i386 machine, 64 bit can run 32 bit, but not that other way around.
    – user270595
    Dec 5, 2013 at 19:12
  • I currently run i386_32 system on i386_64 kernel. It runs fine. But I want to start slow migration to 64-bits. Next step is libraries.
    – Vi.
    Dec 5, 2013 at 19:16
  • @Slowki if he has a 64-bit kernel (with a 64-bit CPU) and the amd64 dependencies, then there isn't a problem How do you run a 32-bit program on a 64-bit version of Ubuntu?
    – Braiam
    Dec 5, 2013 at 19:21
  • @Braiam, Why change title? The primary question is already answered (apt-cache policy - I didn't knew about it before). Now the discussion about relatively unrelated thing.
    – Vi.
    Dec 5, 2013 at 20:45

2 Answers 2


How to get codename (“wheezy” or “sid”) of a package version?

Since Debian is a rolling release, packages doesn't have sid or wheezy attached anywhere, the only way to know from where you installed the package is using apt-cache policy package.

About libc6 problem:

If you want to "upgrade" from 32 to 64-bits then it's not possible, or more like it's likely that you will break the system.

The libc6 package is the mother lord of all dependencies. Is the one that ultimately will tell if your system is 64 or 32 bits, and change it is not easy. The old guide to migrate will not work anymore since there is a beauty called Multiarch. There's another guide but it's too dangerous to be tried in production (aka your home PC) and you will probably end with an unbootable system (start crying if it's your only) with the only solution of a reinstall. So, you want a system 64-bits to the core and have a 32-bits already installed? Solutions:

  1. Use a VM
  2. Use a LXC
  3. Reinstall
  4. Try to cross it over
  5. Cry then reinstall

Those are your only solutions.

  • Installing libc6:amd64 should not be dangerous because of system is i386, so nothing currently depends on libc6:amd64. But the version of libc6:amd64 and libc6:i386 should match. But I can't find required version for amd64 and currently don't know why...
    – Vi.
    Dec 5, 2013 at 20:01
  • My primary laptop's system is backed up, so I expect to be able to go back if needed.
    – Vi.
    Dec 5, 2013 at 20:03
  • Can't have both libc6:i386 and libc6:amd64 at the same time? What is that multiarch for in this case? I want to be able to install and/or run both i386-only and amd64-only programs...
    – Vi.
    Dec 5, 2013 at 20:07
  • Multiarch is the term being used to refer to the capability of a system to install and run applications of multiple different binary targets on the same system. -> Looks like just what I need, expect of for me For example running a i386-linux-gnu application on an amd64-linux-gnu system. is reversed: i386 should stay primery for a while, and amd64 is extra. How I expect install any amd64 package if most of them depend on libc6:amd64 which is non-installable by design (Breaks: libc6:amd64)?
    – Vi.
    Dec 5, 2013 at 20:15
  • As a first program to check out x86_64 I tried to run eureqa_0_99_2_X11_x86-64. It failed with missing library libssl.so.1.0.0. (libc6 itself seems to be actually available in /lib64). I tried to install libssl1.0.0:amd64, but it failed because of it can't find basic amd64 deps...
    – Vi.
    Dec 5, 2013 at 20:24

Have you tryed with apt-cache madison ?

eclipxe@localhost:~# apt-cache madison iceweasel
 iceweasel |     25.0-1 | http://ftp.debian.org/debian/ experimental/main amd64 Packages
 iceweasel | 24.1.0esr-1 | http://ftp.debian.org/debian/ unstable/main amd64 Packages
 iceweasel | 17.0.9esr-1~deb7u1 | http://ftp.debian.org/debian/ testing/main amd64 Packages

eclipxe@localhost:~# apt-cache madison iceweasel | awk '{print $1,$6}'
iceweasel experimental/main
iceweasel unstable/main
iceweasel testing/main

(I'm running debian testing with unstable [Pin: 200] and experimental [Pin: 1])

Also, when you're installing packages from a higher version try to use --target-release:

apt-get install -t unstable iceweasel
  • Nice, only the man page documents it D:!
    – Braiam
    Dec 5, 2013 at 22:39
  • also apt-show-versions can help on this Dec 5, 2013 at 22:46
  • apt-show-versions libc6 -> libc6/testing uptodate 2.17-97; apt-show-versions libc6:i386 -> libc6:i386 not installed (even not available)... Does it even know about multiarch?
    – Vi.
    Dec 5, 2013 at 22:50
  • My apt-show-versions is 0.22.3, this is my output: # apt-show-versions libc6 libc6:amd64/testing 2.17-97 uptodate libc6:i386/testing 2.17-97 uptodate Dec 6, 2013 at 2:46
  • The multiarch support in apt-show-versions was added in version 0.21. In stable the current version is 0.20. Maybe apt-get install -t testing apt-show-versions ? Dec 6, 2013 at 2:52

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.