注意:这适用于 Centos 7。如果您正在寻找 Debian 的答案,请参阅此问题。这些答案不会在这里重复。
安装 centos 7 后,我无法访问手册页:
# man ls
-bash: man: command not found
Run Code Online (Sandbox Code Playgroud)
我尝试通过 yum 安装它
# yum install man-pages
... ok
Run Code Online (Sandbox Code Playgroud)
但是再次:
# man ls
-bash: man: command not found
Run Code Online (Sandbox Code Playgroud)
为什么?
Rém*_* B. 20
为了使用man命令,你还必须安装man
前或后包man-pages
一个
# yum install man-pages
... ok
# yum install man
... ok
Run Code Online (Sandbox Code Playgroud)
现在man
已安装
# man ls
NAME
ls - list directory contents
SYNOPSIS
ls [OPTION]... [FILE]...
DESCRIPTION
List information about the FILEs (the current directory by default). Sort entries alphabetically if none of -cftuvSUX nor --sort.
Mandatory arguments to long options are mandatory for short options too. ...
Run Code Online (Sandbox Code Playgroud)
小智 8
我在我的 docker 容器中遇到了同样的问题并通过tsflags=nodocs
在/etc/yum.conf
文件中注释来解决它,然后我删除了手册页和 man-db 并重新安装它们。它以这种方式工作正常。
$ vi /etc/yum.conf
Run Code Online (Sandbox Code Playgroud)
tsflags
在文件中搜索并在其前面添加注释 (#):
#tsflags=nodocs
Run Code Online (Sandbox Code Playgroud)
现在删除 man-db 和 man-pages 如果它已经安装在你的系统上:
$ yum remove man-pages man-db
Run Code Online (Sandbox Code Playgroud)
然后再次安装它们:
$ yum install man-pages man-db
Run Code Online (Sandbox Code Playgroud)
排序!
归档时间: |
|
查看次数: |
31491 次 |
最近记录: |