争怎路由网:是一个主要分享无线路由器安装设置经验的网站,汇总WiFi常见问题的解决方法。

在ubuntu16.04系统下取得glibc的版本号

时间:2024/7/9作者:未知来源:争怎路由网人气:

grep libc
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f7c45491000)
ghostwu@ubuntu:~/c_program/linux_unix/chapter4$ /lib/x86_64-linux-gnu/libc.so.6 
GNU C Library (Ubuntu GLIBC 2.23-0ubuntu9) stable release version 2.23, by Roland McGrath et al.
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.
Compiled by GNU CC version 5.4.0 20160609.
Available extensions:
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
libc ABIs: UNIQUE IFUNC
For bug reporting instructions, please see:
.
这个就是我的电脑上glibc的路径:/lib/x86_64-linux-gnu/libc.so.6
 
方法二:man -k glibc,可以找到一个系统函数gnu_get_libc_version,他可以用来获取版本:
ghostwu@ubuntu:~$ man -k libc
cracklib-check (8)   - Check passwords using libcrack2
create-cracklib-dict (8) - Check passwords using libcrack2
curl-config (1)      - Get information about a libcurl installation
error (3)            - glibc error reporting functions
error_at_line (3)    - glibc error reporting functions
error_message_count (3) - glibc error reporting functions
error_one_per_line (3) - glibc error reporting functions
error_print_progname (3) - glibc error reporting functions
glibc (7)            - overview of standard C libraries on Linux
gnu_get_libc_release (3) - get glibc version and release
gnu_get_libc_version (3) - get glibc version and release
libc (7)             - overview of standard C libraries on Linux
ghostwu@ubuntu:~$ man 3 gnu_get_libc_version 
/*===============================================
*   Copyright (C) 2018 . All rights reserved.
*   
*   文件名称:check_glibc_version.c
*   创 建 者:ghostwu(吴华)
*   创建日期:2018年01月10日
*   描    述:获取GNU C库(glibc)的版本号
*
===============================================*/
#include
#include
int main(int argc, char *argv[])
{
printf("glibc's version: %s\n", gnu_get_libc_version() );
return 0;
}
 
方法三、getconf GNU_LIBC_VERSION


关键词:在ubuntu16.04系统下取得glibc的版本号




Copyright © 2012-2018 争怎路由网(http://www.zhengzen.com) .All Rights Reserved 网站地图 友情链接

免责声明:本站资源均来自互联网收集 如有侵犯到您利益的地方请及时联系管理删除,敬请见谅!

QQ:1006262270   邮箱:kfyvi376850063@126.com   手机版