我发现我的man
命令消失了RHEL7
:
# man ls
bash: man: command not found...
# which man
/usr/bin/which: no man in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/usr/local/go/bin:/root/gocode/bin:/root/bin:/opt/linuxki)
但是man
,man-pages
所有这些都在我的盒子上:
# yum install man
Loaded plugins: auto-update-debuginfo, langpacks, product-id, search-disabled-repos, subscription-manager
Package man-db-2.6.3-9.el7.x86_64 already installed and latest version
Nothing to do
# yum install man-pages
Loaded plugins: auto-update-debuginfo, langpacks, product-id, search-disabled-repos, subscription-manager
Package man-pages-3.53-5.el7.noarch already installed and latest version
Nothing to do
哪儿man
去了?
更新1:
尝试重新安装man
,但提示以下错误:
......
Running transaction
Installing : man-db-2.6.3-9.el7.x86_64 1/1
Error unpacking rpm package man-db-2.6.3-9.el7.x86_64
error: unpacking of archive failed on file /usr/bin/man: cpio: rename
Verifying : man-db-2.6.3-9.el7.x86_64 1/1
Failed:
man-db.x86_64 0:2.6.3-9.el7
更新2
# ls -lt /usr/bin/man
total 4
drwxr-xr-x. 2 nan nan 81 Mar 24 22:30 man1
drwxr-xr-x. 2 nan nan 4096 Mar 24 22:30 man7
# stat /usr/bin/man
File: ‘/usr/bin/man’
Size: 28 Blocks: 0 IO Block: 4096 directory
Device: fd00h/64768d Inode: 67811254 Links: 4
Access: (0755/drwxr-xr-x) Uid: ( 1000/ nan) Gid: ( 1000/ nan)
Context: unconfined_u:object_r:bin_t:s0
Access: 2016-04-15 17:47:56.613595324 +0800
Modify: 2016-03-24 22:30:30.000000000 +0800
Change: 2016-04-08 11:08:45.605815500 +0800
Birth: -
卸载
—
GAD3R 2016年
man
,删除/usr/bin/man
并安装man-pages
然后再安装man
@EightBitTony:添加
—
南晓
ls -l /usr/bin/man
和的输出stat /usr/bin/man
,谢谢!
RPM使用
—
GAD3R
cpio
了存档格式,这就是为什么我们在尝试替换文件时看到cpio错误/usr/bin/man
好吧,我不知道为什么-但是您
—
AugustBitTony
/usr/bin/man
似乎是目录,而不是单个可执行文件。就像有人在/ usr / bin / man上复制了手册页目录一样。
ls -l /usr/bin/man
到上面的问题中吗(实际上也包括在内stat /usr/bin/man
)。