Chinaunix首页 | 论坛 | 博客
  • 博客访问: 432935
  • 博文数量: 55
  • 博客积分: 2235
  • 博客等级: 大尉
  • 技术积分: 625
  • 用 户 组: 普通用户
  • 注册时间: 2008-05-14 13:34
文章分类
文章存档

2012年(2)

2011年(26)

2010年(1)

2009年(20)

2008年(6)

我的朋友

分类: LINUX

2011-04-24 23:31:47

Here is an answer from the "Frequently Asked Questions about the GNU C Library" (the FAQ):

4.9.	How can I find out which version of glibc I am using in the moment?

{UD} If you want to find out about the version from the command line simply
run the libc binary.  This is probably not possible on all platforms but
where it is simply locate the libc DSO and start it as an application.  On
Linux like

	/lib/libc.so.6

This will produce all the information you need.

What always will work is to use the API glibc provides.  Compile and run the
following little program to get the version information:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#include 
#include 
int main (void) { puts (gnu_get_libc_version ()); return 0; }
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This interface can also obviously be used to perform tests at runtime if
this should be necessary.

Just execute:

ldd --version

which comes with glibc package

阅读(6404) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~