-bash: man: command not found

报错信息为:

-bash: man: command not found

安装man

[root@linux ~]# yum install man
已加载插件:fastestmirror
设置安装进程
Loading mirror speeds from cached hostfile
解决依赖关系
--> 执行事务检查
---> Package man.x86_64 0:1.6f-39.el6 will be 安装
--> 处理依赖关系 lzma,它被软件包 man-1.6f-39.el6.x86_64 需要
--> 执行事务检查
---> Package xz-lzma-compat.x86_64 0:4.999.9-0.5.beta.20091007git.el6 will be 安装
--> 处理依赖关系 xz = 4.999.9-0.5.beta.20091007git.el6,它被软件包 xz-lzma-compat-4.999.9-0.5.beta.20091007git.el6.x86_64 需要
--> 执行事务检查
---> Package xz.x86_64 0:4.999.9-0.5.beta.20091007git.el6 will be 安装
--> 完成依赖关系计算

依赖关系解决

================================================================================
 软件包            架构      版本                                 仓库     大小
================================================================================
正在安装:
 man               x86_64    1.6f-39.el6                          base    265 k
为依赖而安装:
 xz                x86_64    4.999.9-0.5.beta.20091007git.el6     base    137 k
 xz-lzma-compat    x86_64    4.999.9-0.5.beta.20091007git.el6     base     16 k

事务概要
================================================================================
Install       3 Package(s)

总下载量:418 k
Installed size: 887 k
确定吗?[y/N]:y
下载软件包:
(1/3): man-1.6f-39.el6.x86_64.rpm                        | 265 kB     00:00
(2/3): xz-4.999.9-0.5.beta.20091007git.el6.x86_64.rpm    | 137 kB     00:00
(3/3): xz-lzma-compat-4.999.9-0.5.beta.20091007git.el6.x |  16 kB     00:00
--------------------------------------------------------------------------------
总计                                             95 kB/s | 418 kB     00:04
运行 rpm_check_debug
执行事务测试
事务测试成功
执行事务
  正在安装   : xz-4.999.9-0.5.beta.20091007git.el6.x86_64                   1/3
  正在安装   : xz-lzma-compat-4.999.9-0.5.beta.20091007git.el6.x86_64       2/3
  正在安装   : man-1.6f-39.el6.x86_64                                       3/3
  Verifying  : xz-lzma-compat-4.999.9-0.5.beta.20091007git.el6.x86_64       1/3
  Verifying  : man-1.6f-39.el6.x86_64                                       2/3
  Verifying  : xz-4.999.9-0.5.beta.20091007git.el6.x86_64                   3/3

已安装:
  man.x86_64 0:1.6f-39.el6

作为依赖被安装:
  xz.x86_64 0:4.999.9-0.5.beta.20091007git.el6
  xz-lzma-compat.x86_64 0:4.999.9-0.5.beta.20091007git.el6

完毕!



安装完成之后,重新输入命令验证是否解决

[root@linux ~]# man 5 passwd
Cannot open the message catalog "man" for locale "zh_CN.UTF-8"
(NLSPATH="/usr/share/locale/%l/LC_MESSAGES/%N")

No entry for passwd in section 5 of the manual
[root@linux ~]# man
Cannot open the message catalog "man" for locale "zh_CN.UTF-8"
(NLSPATH="/usr/share/locale/%l/LC_MESSAGES/%N")

What manual page do you want?


还是不行,因为看到提示信息里面有open,所以没有直接尝试(2),选择继续去百度,百度给出的解释是没有安装man -pages,抱着试一试的心态继续操作安装man -pages

[root@linux ~]# yum -y install man man-pages
已加载插件:fastestmirror
设置安装进程
Loading mirror speeds from cached hostfile
包 man-1.6f-39.el6.x86_64 已安装并且是最新版本
解决依赖关系
--> 执行事务检查
---> Package man-pages.noarch 0:3.22-20.el6 will be 安装
--> 完成依赖关系计算

依赖关系解决

================================================================================
 软件包             架构            版本                    仓库           大小
================================================================================
正在安装:
 man-pages          noarch          3.22-20.el6             base          4.8 M

事务概要
================================================================================
Install       1 Package(s)

总下载量:4.8 M
Installed size: 4.3 M
下载软件包:
man-pages-3.22-20.el6.noarch.rpm                         | 4.8 MB     00:04
运行 rpm_check_debug
执行事务测试
事务测试成功
执行事务
  正在安装   : man-pages-3.22-20.el6.noarch                                 1/1
  Verifying  : man-pages-3.22-20.el6.noarch                                 1/1

已安装:
  man-pages.noarch 0:3.22-20.el6

完毕!



安装完毕之后再次输入命令验证是否解决

[root@linux ~]# man 5 passwd
Cannot open the message catalog "man" for locale "zh_CN.UTF-8"
(NLSPATH="/usr/share/locale/%l/LC_MESSAGES/%N")

Formatting page, please wait...
PASSWD(5)                  Linux Programmer’s Manual                 PASSWD(5)

NAME
       passwd - password file

DESCRIPTION
       Passwd  is  a text file, that contains a list of the system’s accounts,
       giving for each account some useful information like user ID, group ID,
       home  directory,  shell,  etc.   Often,  it also contains the encrypted
       passwords for each account.  It should  have  general  read  permission
       (many  utilities,  like ls(1) use it to map user IDs to usernames), but
       write access only for the superuser.

       In the good old days there was no great problem with this general  read
       permission.   Everybody  could  read  the  encrypted passwords, but the
       hardware was too slow to crack a well-chosen  password,  and  moreover,
       the  basic  assumption  used  to  be that of a friendly user-community.
       These days many people run some version of the shadow  password  suite,
       where  /etc/passwd  has  "x"  instead  of  encrypted passwords, and the
       encrypted passwords are in /etc/shadow which is readable by  the  supe-
       ruser only.

       If the encrypted password, whether in /etc/passwd or in /etc/shadow, is
       an empty string, login is allowed without even asking for  a  password.
       Note  that this functionality may be intentionally disabled in applica-
       tions, or configurable (for example  using  the  "nullok"  or  "nonull"
       arguments to pam_unix.so).

       If  the  encrypted  password  in  /etc/passwd  is  "*NP*"  (without the
       quotes), the shadow record should be obtained from a NIS+ server.
:



OK 搞定 嘻嘻~

posted @ 2022-05-26 23:42  King-DA  阅读(101)  评论(0)    收藏  举报