What version of glibc is Python using?

John Nagle nagle at animats.com
Sat Oct 12 03:03:44 EDT 2013


On 10/11/2013 11:50 PM, Christian Gollwitzer wrote:
> Am 12.10.13 08:34, schrieb John Nagle:
>> I'm trying to find out which version of glibc Python is using.
>> I need a fix that went into glibc 2.10 back in 2009.
>> (http://udrepper.livejournal.com/20948.html)
>>
>> So I try the recommended way to do this, on a CentOS server:
>>
>> /usr/local/bin/python2.7
>> Python 2.7.2 (default, Jan 18 2012, 10:47:23)
>> [GCC 4.4.6 20110731 (Red Hat 4.4.6-3)] on linux2
>> Type "help", "copyright", "credits" or "license" for more information.
>>>>> import platform
>>>>> platform.libc_ver()
>> ('glibc', '2.3')
> 
> Try
> 
>     ldd /usr/local/bin/python2.7
> 
> Then execute the reported libc.so, which gives you some information.
> 
> Christian
> 
Thanks for the quick reply. That returned:

 /lib64/libc.so.6
GNU C Library stable release version 2.12, by Roland McGrath et al.
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 4.4.6 20110731 (Red Hat 4.4.6-3).
Compiled on a Linux 2.6.32 system on 2011-12-06.
Available extensions:
        The C stubs add-on version 2.1.2.
        crypt add-on version 2.1 by Michael Glad and others
        GNU Libidn by Simon Josefsson
        Native POSIX Threads Library by Ulrich Drepper et al
        BIND-8.2.3-T5B
        RT using linux kernel aio
libc ABIs: UNIQUE IFUNC
For bug reporting instructions, please see:
<http://www.gnu.org/software/libc/bugs.html>.

Much more helpful.  I have a good version of libc, and
can now work on my DNS resolver problem.

Why is the info from "plaform.libc_ver()" so bogus?

				John Nagle




More information about the Python-list mailing list