No manual entry for pthread_create

本文介绍了解决Ubuntu系统中pthread文档缺失的方法。通过安装manpages-posix和manpages-posix-dev包,用户可以获取pthread相关的手册页,进而查阅pthread_create等函数的详细文档。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 


1.If you check any pthread man page in a fresh Ubuntu system, you may encounter the following errors

root@vinco:/home/vinco# man pthread_create
No manual entry for pthread_create
root@vinco:/home/vinco# man 2 pthread_create
No manual entry for pthread_create in section 2
root@vinco:/home/vinco# man 3 pthread_create
No manual entry for pthread_create in section 3
root@vinco:/home/vinco# man 4 pthread_create
No manual entry for pthread_create in section 4
root@vinco:/home/vinco# man 5 pthread_create
No manual entry for pthread_create in section 5
root@vinco:/home/vinco# man 6 pthread_create
No manual entry for pthread_create in section 6

 

2.To deal with this issue, you must install the pthread man pages:

root@vinco:/home/vinco# apt-get install manpages-posix manpages-posix-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  manpages-dev
The following NEW packages will be installed:
  manpages-dev manpages-posix manpages-posix-dev
0 upgraded, 3 newly installed, 0 to remove and 316 not upgraded.
Need to get 3,836kB of archives.
After this operation, 9,728kB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Get:1 http://cn.archive.ubuntu.com karmic/main manpages-dev 3.21-1 [1,546kB]
Get:2 http://cn.archive.ubuntu.com karmic/multiverse manpages-posix 2.16-1 [863kB]                                                                                     
Get:3 http://cn.archive.ubuntu.com karmic/multiverse manpages-posix-dev 2.16-1 [1,428kB]                                                                               
Fetched 3,836kB in 1min 50s (34.7kB/s)                                                                                                                                 
Selecting previously deselected package manpages-dev.
(Reading database ... 140623 files and directories currently installed.)
Unpacking manpages-dev (from .../manpages-dev_3.21-1_all.deb) ...
Selecting previously deselected package manpages-posix.
Unpacking manpages-posix (from .../manpages-posix_2.16-1_all.deb) ...
Selecting previously deselected package manpages-posix-dev.
Unpacking manpages-posix-dev (from .../manpages-posix-dev_2.16-1_all.deb) ...
Processing triggers for man-db ...
Setting up manpages-dev (3.21-1) ...
Setting up manpages-posix (2.16-1) ...
Setting up manpages-posix-dev (2.16-1) ...
root@vinco:/home/vinco# 

Now you are able to refer any pthread documentation

 

root@vinco:/home/vinco# man pthread_create

NAME       pthread_create - thread creationSYNOPSIS       
#include <pthread.h>       
int pthread_create(pthread_t *restrict thread,
              const pthread_attr_t *restrict attr,
              void *(*start_routine)(void*), void *restrict arg);


 

take reference from :http://joysofprogramming.com/install-pthread-manpages-in-ubuntu/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值