No manual entry for ls解决办法

简介: No manual entry for ls解决办法

No manual entry for ls解决办法

如果在 Linux 中运行 man ls 命令时提示“no manual entry for ls”,则可能是因为您的系统没有安装 man 页面或者该页面已经被删除。此外,也有可能是您输入的命令不是标准命令。

可以通过以下方式进行排查:


1.确认 man 是否已安装

使用以下命令检查系统中是否已安装 man 命令:

which man
• 1

如果命令输出了 man 的路径,则表示 man 命令已经安装在系统中。


2.确认 ls 是否为标准命令

有些自定义的命令可能无法在 man 页面中找到,这是因为它们不是标准命令。使用以下命令确定 ls 是否为标准命令:

type -a ls
• 1

如果命令输出了 /bin/ls 或者 /usr/bin/ls,则表示 ls 是标准命令。


3.安装缺失的 man 页面

系统默认安装的 manpage 不够齐全。以 Ubuntu 为例,可以按照如下方式进行安装:

sudo apt install manpages-dev glibc-doc manpages-posix manpages-posix-dev

db24de6af4e046ac91356517f3d63f68.png

jetsontx2nx606@jetsontx2nx606-desktop:~$ sudo apt install manpages-dev glibc-doc manpages-posix manpages-posix-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
manpages-dev is already the newest version (4.15-1).
manpages-dev set to manually installed.
The following packages were automatically installed and are no longer required:
  activity-log-manager libgeonames-common libgeonames0 libnm-gtk0 libpinyin-data libpinyin13
  libtimezonemap-data libtimezonemap1 libunity-control-center1
Use 'sudo apt autoremove' to remove them.
The following NEW packages will be installed:
  glibc-doc glibc-doc-reference manpages-posix manpages-posix-dev
0 upgraded, 4 newly installed, 0 to remove and 197 not upgraded.
Need to get 8,228 kB of archives.
After this operation, 19.6 MB of additional disk space will be used.
Get:1 http://ports.ubuntu.com/ubuntu-ports bionic/multiverse arm64 manpages-posix all 2013a-2 [929 kB]
Get:2 http://ports.ubuntu.com/ubuntu-ports bionic/multiverse arm64 manpages-posix-dev all 2013a-2 [1,794 kB]
Get:3 http://ports.ubuntu.com/ubuntu-ports bionic/main arm64 glibc-doc-reference all 2.27-1 [5,483 kB]
Get:4 http://ports.ubuntu.com/ubuntu-ports bionic-updates/main arm64 glibc-doc all 2.27-3ubuntu1.6 [22.2 kB]
Fetched 8,228 kB in 7s (1,232 kB/s)                                                           
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package manpages-posix.
(Reading database ... 192285 files and directories currently installed.)
Preparing to unpack .../manpages-posix_2013a-2_all.deb ...
Unpacking manpages-posix (2013a-2) ...
Selecting previously unselected package manpages-posix-dev.
Preparing to unpack .../manpages-posix-dev_2013a-2_all.deb ...
Unpacking manpages-posix-dev (2013a-2) ...
Selecting previously unselected package glibc-doc-reference.
Preparing to unpack .../glibc-doc-reference_2.27-1_all.deb ...
Unpacking glibc-doc-reference (2.27-1) ...
Selecting previously unselected package glibc-doc.
Preparing to unpack .../glibc-doc_2.27-3ubuntu1.6_all.deb ...
Unpacking glibc-doc (2.27-3ubuntu1.6) ...
Setting up glibc-doc-reference (2.27-1) ...
Setting up glibc-doc (2.27-3ubuntu1.6) ...
Setting up manpages-posix (2013a-2) ...
Setting up manpages-posix-dev (2013a-2) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...


4.如果仍然无法运行,则需要手动安装man手册页

4.1.首先从官网链接下载最新版的man手册源码

wget https://mirrors.edge.kernel.org/pub/linux/docs/man-pages/man-pages-6.03.tar.gz


4.2.解压源码包

tar -xzvf man-pages-6.03.tar.gz


4.3.安装man手册

#进入目标目录
cd man-pages-6.03/
#切换到root用户
su
#安装
make install
• 1
• 2
• 3
• 4
• 5
• 6

这样就能正常运行了。

相关文章
|
2月前
|
Linux
Centos7使用man查找命令时,报错No manual entry for xxxx
Centos7使用man查找命令时,报错No manual entry for xxxx
51 0
关于 CMake编译出出现错误“Could not find compiler set in environment variable RC:” 的解决方法
关于 CMake编译出出现错误“Could not find compiler set in environment variable RC:” 的解决方法
关于 CMake编译出出现错误“Could not find compiler set in environment variable RC:” 的解决方法
|
Linux 开发工具 开发者
有关Linux系统出现Malformed line 1 in source list /etc/apt/sources.list (type)问题的解决方式
以下内容仅代表个人意见,本人亲测有效,如果没有效果可以现将之前的sources.list备份的文件恢复 重要的事情说三遍:记得备份,记得备份,记得备份 本文中所阐述的问题大致是因为由于不正常的关闭影响的sources.list文件的异常,以导致这种问题生成的原因,因此在这里考虑进行重新创建sources.list文件来解决问题的处理方式 本蒟蒻在昨晚做Linux(我用的是Debian,教学要求 )的时候,因为要在 /etc/apt/sources.list里添加一些东西,但是更改完之后,发生了错误:
713 0
有关Linux系统出现Malformed line 1 in source list /etc/apt/sources.list (type)问题的解决方式
|
iOS开发 MacOS
如何解决npm命令报错Missing write access to /usr/local/lib/node_modules
如何解决npm命令报错Missing write access to /usr/local/lib/node_modules
如何解决npm命令报错Missing write access to /usr/local/lib/node_modules
|
Linux 编译器 C语言
Linux动态库常见问题之-"cannot open shared object file No such file or directory"的解决办法
Linux编写程序时,会经常的接触动态库,而在程序运行时可能会遇到类似于:libxxx.so cannot open shared object file No such file or directory的问题,这个代表什么含义,该怎么解决呢?
875 0
|
开发工具 容器
解决报错:Couldn't create temporary file /tmp/apt.conf.IRqbCz
问题 操作容器应该是属于服务器开发同学的常规操作,经常我们会遇到系统缺少对应的工具的情况,比如我们进入容器后,想使用 vim 修改某个文件,但是发现该容器没有安装 vim 工具。这个时候,一般都需要自己手动安装,比如在 unbuntu 系统中,可以使用 apt-get 包管理命令。
650 0
解决报错:Couldn't create temporary file /tmp/apt.conf.IRqbCz
|
运维
yum update 执行报错: error : unpacking of archive failed on file /usr/.../...;5d26ff7c: cpio : symlink
yum update 执行报错: error : unpacking of archive failed on file /usr/.../...;5d26ff7c: cpio : symlink早前已发现有台机一直在报这么个错误, 一用yum update 就报一堆: Error: unpacking rpm package .
2325 0
Confluence 6 针对 key "cp_" 或 "cps_" 的 "Duplicate Entry" 问题解决
如果你遇到了下面的错误信息,例如: com.atlassian.confluence.importexport.ImportExportException: Unable to complete import becaus...
1201 0