ubuntu中的libc或glibc? [英] libc or glibc in ubuntu?
问题描述
我对这些库有些困惑.我现在正在使用Ubuntu,我使用的是g ++ 5,我看到我的应用程序链接在libc.so中.它是Ubuntu的C标准库实现吗?与glibc不同吗?
I'm a little bit confused with these libraries. I'm working on Ubuntu now, I use g++ 5 and I see that my applications link in libc.so. Is it a Ubuntu's implementation of C standard library? Is it different from glibc?
$ ldd application.exe
...
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6
...
推荐答案
当前Ubuntu将glibc用于C标准库实现.原始程序包称为 glibc
,但已安装的二进制软件包称为 libc6
是出于历史原因.如果运行以下命令,则可以在系统上看到libc6
软件包的确切版本:
Current Ubuntu uses glibc for the C standard library implemnetation. The source package is called glibc
, but the installed binary package is called libc6
for historic reasons. You can see the exact version of the libc6
package on your system if you run this command:
dpkg -l libc6
曾经有一个叫做elibc的glibc临时分支,但是 eglibc的开发已经完成放弃;在此之前,所有活动的特定于eglibc的端口都已合并到glibc中.
There used to be a temporary fork of glibc called eglibc, but eglibc development has been abandoned; all active eglibc-specific ports were merged into glibc before that.
Ubuntu also has packages for alternative libc implementations such as musl, but the distribution itself does not use them because it is glibc-based.
这篇关于ubuntu中的libc或glibc?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!