日期:2014-05-16  浏览次数:20719 次

Linux 帮助手册安装不全
今天在新安装的 fedora 17 虚拟机上写多线程程序的时候,本想查看下系统帮助手册中关于线程相关函数的说明,结果。。。
[tom@localhost thread]$ man pthread_create
No manual entry for pthread_create
为啥呢?
在以下网页上找到了答案:
http://blog.163.com/yungang_z/blog/static/1751531332011103103529810/
于是操作如下(安装手册):
[tom@localhost thread]$ yum install man-pages -y
Loaded plugins: langpacks, presto, refresh-packagekit
You need to be root to perform this command.
[tom@localhost thread]$ sudo yum install man-pages -y
Loaded plugins: langpacks, presto, refresh-packagekit
Existing lock /var/run/yum.pid: another copy is running as pid 6661.
Another app is currently holding the yum lock; waiting for it to exit...
  The other application is: PackageKit
    Memory :  26 M RSS (431 MB VSZ)
    Started: Sun Dec 16 17:57:33 2012 - 00:32 ago
    State  : Sleeping, pid: 6661 
从上面红色部分可以看到,由于 yum 锁被另一个名为 PackageKit 的进程占用,因此本安装没法继续进行,于是查出那个进程,然后 kill 掉:
[tom@localhost ~]$ ps -ef | grep package
root      6656     1  0 17:57 ?        00:00:00 /usr/libexec/packagekitd
tom       6744  6686  0 17:59 pts/0    00:00:00 grep --color=auto package
[tom@localhost ~]$ kill 6656
[tom@localhost ~]$ sudo kill 6656
[sudo] password for tom: 
[tom@localhost ~]$ ps -ef | grep package
tom       6780  6686  0 18:01 pts/0    00:00:00 grep --color=auto package 
一旦该进程被 kill 成功之后,手册安装就能成功进行了:
Resolving Dependencies
--> Running transaction check
---> Package man-pages.noarch 0:3.35-4.fc17 will be installed
--> Finished Depen