PrintLogo

How to Tell Which Glibc You Are Using Before Updating




One problem that can get really nasty is if you update an RPM system with the wrong version of glibc. First, we need to find out what glibc RPMs are installed, and then we can determine the architecture:

[root@srv-3 root]# rpm -qa | grep glibc
glibc-devel-2.3.2-101
glibc-common-2.3.2-101
glibc-kernheaders-2.4-8.36
glibc-2.3.2-101
glibc-headers-2.3.2-101
[root@srv-3 root]# rpm -q --qf '%{arch}\n' glibc-common
i386
[root@srv-3 root]# rpm -q --qf '%{arch}\n' glibc-devel
i386
[root@srv-3 root]# rpm -q --qf '%{arch}\n' glibc-kernheaders
i386
[root@srv-3 root]# rpm -q --qf '%{arch}\n' glibc-headers
i386
[root@srv-3 root]# rpm -q --qf '%{arch}\n' glibc
i686
[root@srv-3 root]#

Of course, you can use this to determine the architecture of other RPMs as well. The {} will reveal other fields. For instance:

[root@srv-3 root]# rpm -q --qf '%{distribution}\n' glibc
Red Hat Linux
[root@srv-3 root]#

See the RPM Manpage for more info.



This article comes from NetAdminTools:
http://www.netadmintools.com/

The URL for this story is:
http://www.netadmintools.com/art326.html

Copyright 1997-2008 NetAdminTools.com. Read our Terms of Use.