Tôi tìm thấy manlệnh biến mất trên 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)
Nhưng manvà man-pagestất cả đều nằm trong hộp của tôi:
# 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đi đâu?
Cập nhật 1 :
Hãy thử cài đặt lại man, nhưng nó sẽ nhắc các lỗi sau:
......
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
Cập nhật 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: -
man, gỡ bỏ /usr/bin/manvà cài đặt man-pagessau đó cài đặtman
ls -l /usr/bin/manvà stat /usr/bin/man, cảm ơn!
cpionhư định dạng lưu trữ của nó, đó là lý do tại sao chúng tôi gặp lỗi cpio khi cố gắng thay thế tệp/usr/bin/man
/usr/bin/mandường như thư mục của bạn là một thư mục, chứ không phải là một tệp thực thi. Gần như là ai đó đã sao chép thư mục trang man qua / usr / bin / man.
ls -l /usr/bin/mancâu hỏi của bạn ở trên không (thực tế, bao gồmstat /usr/bin/mancả).