如何在 Ubuntu 14.04 中安装 libpthread.a?

How to install libpthread.a in Ubuntu 14.04?

我正在为我的 64 位机器寻找 libpthread.a(静态库)。 现在,我的系统中有了共享库。

/lib/x86_64-linux-gnu/libpthread-2.19.so  
/lib/x86_64-linux-gnu/libpthread.so.0

有什么方法可以只用 "apt-get install" 获得静态库吗?

和都

在我的系统上:

~$ dpkg -S /usr/lib/x86_64-linux-gnu/libpthread.a
libc6-dev:amd64: /usr/lib/x86_64-linux-gnu/libpthread.a

Apt-get 安装

sudo apt-get install libpthread-stubs0-dev

结果:

[sudo] password for administrator: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libntdb1 python-ntdb
Use 'apt-get autoremove' to remove them.
The following NEW packages will be installed:
  libpthread-stubs0-dev
0 upgraded, 1 newly installed, 0 to remove and 71 not upgraded.
Need to get 4,068 B of archives.
After this operation, 41.0 kB of additional disk space will be used.
Get:1 http://mirrors.163.com/ubuntu/ trusty/main libpthread-stubs0-dev amd64 0.3-4 [4,068 B]
Fetched 4,068 B in 0s (8,675 B/s)          
Selecting previously unselected package libpthread-stubs0-dev:amd64.
(Reading database ... 177941 files and directories currently installed.)
Preparing to unpack .../libpthread-stubs0-dev_0.3-4_amd64.deb ...
Unpacking libpthread-stubs0-dev:amd64 (0.3-4) ...
Setting up libpthread-stubs0-dev:amd64 (0.3-4) ...

查找libpthread.a

ls /usr/lib/x86_64-linux-gnu/ |grep libpthread

结果:

libpthread.a
libpthread_nonshared.a
libpthread.so