关于小悟志网站地图归档友情链接联系Feed

云上小悟 + 

首页 » InfoTech »

三种方法查看glibc的版本号

InfoTech
2017年5月29日 / 28次阅读
标签:CC++

拍拍贷

文章《三种方法查看glibc的版本号》的特色图片

三种方法查看glibc的版本:

 

方法一:

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.

不过,有的时候这个方法不管用,我在Ubuntu桌面上的测试就不行:

root@ubuntu:/# /lib/libc.so.6
bash: /lib/libc.so.6: No such file or directory

 

方法二:

Just execute:

ldd --version

which comes with glibc package.

root@ubuntu:/# ldd --version
ldd (Ubuntu GLIBC 2.23-0ubuntu7) 2.23
Copyright (C) 2016 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.
Written by Roland McGrath and Ulrich Drepper.
root@ubuntu:/#

 

方法三:

写一个小程序,直接打印出glibc的版本号:

#include <stdio.h>
#include <gnu/libc-version.h>
int main (void) 
{ 
    puts (gnu_get_libc_version ()); 
    return 0; 
}

本文链接:http://www.maixj.net/ict/glibc-v-15561
云上小悟 麦新杰(QQ:1093023102)

相关文章

评论是美德

无力满足评论实名制,评论对非实名注册用户关闭,有事QQ:1093023102.


前一篇:
后一篇:

栏目精选


©Copyright 麦新杰 Since 2014 云上小悟独立博客版权所有 备案号:苏ICP备14045477号-1

网站二维码
拍拍贷
go to top