Installing a specific glibc version on debian/apt

14,516

It turns out I was just not familiar enough with apt-get. I managed to install the necessary glibc version by issuing the following command:

apt-get install libc-bin=2.13-38+deb7u4 libc6=2.13-38+deb7u4

I even downgraded it and everything works okay. Core dump analysis works now.

Share:
14,516

Related videos on Youtube

Matthias Gerstner
Author by

Matthias Gerstner

Updated on September 18, 2022

Comments

  • Matthias Gerstner
    Matthias Gerstner over 1 year

    A user of my software uses Debian wheezy. The software generated a core dump that I want to analyze. However, for this to work, I require the correct versions of low level system libraries, especially the glibc.

    So I installed the debian version closest to the users version: Debian wheezy 7.4. Now I've got:

    libc6:amd64 2.13-38+deb7u1 amd64 Embedded GNU C Library: Shared libraries

    apt-get offers me an update to version 2.13-38+deb7u6. I require version 2.13-38+deb7u4, however (that's the one the core dump was generated from).

    What's the supposed way to get exactly this libc version installed?

  • Matthias Gerstner
    Matthias Gerstner over 9 years
    As a last resort that would be possible, of course. However it requires interaction of the user. My users are not necessarily fit or willing to install debug symbols. Instructing them to send me their libraries complicates the debugging process considerably. Maybe they can't even install the correct debug symbols any more without updating libc itself, thus losing the correct libraries again ...
  • wurtel
    wurtel over 9 years
    I didn't mean that the users would have to install the debug versions, if you can obtain the same version of libc6 as your user has, with debugging symbols, then that should work, as they're the same library where one is packaged before and the other after stripping the symbols out.
  • Matthias Gerstner
    Matthias Gerstner over 9 years
    Okay but where would I get exactly that libc binary with debugging symbols if not from Debian somewhere. So far I didn't find much of a package archive or anything.
  • wurtel
    wurtel over 9 years
    As I said, it's an older version, and not every version ever in existence is preserved. The u part indicates it's for a point update . Unfortunately you and your client don't update regularly enough :-)
  • Matthias Gerstner
    Matthias Gerstner over 9 years
    So this brings me back to the start of the question. Because if I don't get a matching binary version of the libc I can't reliably analyze the core dump. Sadly I can't influence the update policies of my clients or what Linux distributions they use. It turns out Debian is not the best choice if I want to analyze my core dumps.
  • wurtel
    wurtel over 9 years
    I generally don't need a matching shared library version to run gdb unless I suspect the problem is inside one of the shared library. Then again, my programs don't dump core when they're fit for release :-P