您的位置:首页 > 其它

ubuntu 下安装 pthread man 遇到的一些问题

2016-10-28 14:10 363 查看
代码时想看pthread_create的函数说明,敲入man pthread_create终端输出No manual entry for pthread_create。应该是有些man文档没有安装。

首先执行:

[cpp]
view plain
copy

sudo apt-cache search pthread  

搜索出来的第一行显示:

[cpp]
view plain
copy

glibc-doc - GNU C Library: Documentation  

 应该就是这个文档没装,执行:

[cpp]
view plain
copy

sudo apt-get install glibc-doc  

安装完后可以查看手册页,但man -k pthread 不能列出所有pthread的函数,需要安装posix-dev

[cpp]
view plain
copy

sudo apt-get install manpages-posix-dev  

此时有时候会出现

[cpp]
view plain
copy

Reading package lists... Done  
Building dependency tree         
Reading state information... Done  
E: Couldn't find package manpages-posix-dev  

执行

[cpp]
view plain
copy

sudo apt-get update  

重启网络:

sudo /etc/init.d/networking restart

现在就差不多搞定拉
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: