首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >Ubuntu 22.04服务器最小安装中缺少的手册

Ubuntu 22.04服务器最小安装中缺少的手册
EN

Ask Ubuntu用户
提问于 2022-07-05 09:08:54
回答 1查看 1.9K关注 0票数 3

我已经安装了一个22.04 LTS Ubuntu Server作为最小安装,并安装了以下软件包:

代码语言:javascript
运行
复制
vim man-db manpages dialog bash-completion screen

现在,当我运行man ls时,ubuntu要求我运行unminimize命令,尽管man包已经安装:

代码语言:javascript
运行
复制
$ dpkg -l | egrep "man-db|manpages"
ii  isc-dhcp-common                       4.4.1-2.3ubuntu2.1                      amd64        common manpages relevant to all of the isc-dhcp packages
ii  man-db                                2.10.2-1                                amd64        tools for reading manual pages
ii  manpages                              5.10-1ubuntu1                           all          Manual pages about using a GNU/Linux system

目录/usr/share/man/man1为空:

代码语言:javascript
运行
复制
$ ls /usr/share/man/man1
$ man -w ls
This system has been minimized by removing packages and content that are
not required on a system that users do not log into.

To restore this content, including manpages, you can run the 'unminimize'
command. You will still need to ensure the 'man-db' package is installed.

mandb输出:

代码语言:javascript
运行
复制
$ sudo mandb
Purging old database entries in /usr/share/man...
Processing manual pages under /usr/share/man...
Purging old database entries in /usr/share/man/id...
Processing manual pages under /usr/share/man/id...
...
Processing manual pages under /usr/local/man...
mandb: cant update index cache /var/cache/man/oldlocal/8087: No such file or directory
0 man subdirectories contained newer manual pages.
0 manual pages were added.
0 stray cats were added.
0 old database entries were purged.
$

最奇怪的是:

代码语言:javascript
运行
复制
$ ls $(dpkg -L coreutils | grep man1/ls.1)
ls: cannot access '/usr/share/man/man1/ls.1.gz': No such file or directory

发现这个:

代码语言:javascript
运行
复制
$ dpkg -S bin/man
man-db: /usr/bin/manpath
local diversion from: /usr/bin/man
local diversion to: /usr/bin/man.REAL
man-db: /usr/bin/man
local diversion from: /usr/bin/man
local diversion to: /usr/bin/man.REAL
man-db: /usr/bin/mandb
man-db: /usr/bin/man-recode
$ head $(which man)
#!/bin/sh
echo "This system has been minimized by removing packages and content that are"
echo "not required on a system that users do not log into."
echo ""
echo "To restore this content, including manpages, you can run the 'unminimize'"
echo "command. You will still need to ensure the 'man-db' package is installed."
$ man.REAL -w ls
No manual entry for ls

如何才能解决这一问题而不必将Ubuntu降到最低?

EN

回答 1

Ask Ubuntu用户

回答已采纳

发布于 2022-07-05 15:17:10

“最小化”Ubuntu在/etc/dpkg/dpkg.cfg.d/excludes中制定了一些规则,包括不安装man和所有手册。它还将man二进制文件切换为输出您看到的关于最小化Ubuntu的消息的文件。您可以编辑文件/etc/dpkg/dpkg.cfg.d/excludes并注释掉以下行:

代码语言:javascript
运行
复制
path-exclude=/usr/share/man

然后,您可以使用apt update并安装manmanpages

票数 5
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/1417294

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档