处理 man-db 的触发器。没有建立数据库; man-db/auto-update 不是 'true ,错误

处理 man-db 的触发器。没有建立数据库; man-db/auto-update 不是 'true ,错误

每次我通过终端在 KDE neon 中安装新软件包时都会收到此消息,这是否正常,我应该忽略它还是应该解决这个问题?

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Starting pkgProblemResolver with broken count: 0
Starting 2 pkgProblemResolver with broken count: 0
Done
The following NEW packages will be installed:
  tree
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/43.0 kB of archives.
After this operation, 115 kB of additional disk space will be used.
Selecting previously unselected package tree.
(Reading database ... 280095 files and directories currently installed.)
Preparing to unpack .../tree_1.8.0-1_amd64.deb ...
Unpacking tree (1.8.0-1) ...
Setting up tree (1.8.0-1) ...
Processing triggers for man-db (2.9.1-1) ...
Not building database; man-db/auto-update is not 'true'.

答案1

警告只是警告;这意味着mandb安装相关软件包时不会运行它,其结果是手册页索引缓存不会更新。

警告的技术原因是缺少/var/lib/man-db/auto-update.我不确定是什么原因造成的。要恢复man-db触发器,请恢复该文件:

sudo touch /var/lib/man-db/auto-update

您将不再看到警告,并且缓存将被更新。您可以自己更新缓存:

sudo mandb -pq

答案2

删除旧的 mandb 索引:

sudo rm -rf /var/cache/man/*

重新生成它:

sudo mandb -c

或者将您的设备连接到交流电源然后运行(需要几分钟):

sudo systemctl restart man-db.service

然后检查man-db.service

systemctl status man-db.service

答案3

检查你的 debconf 设置:

bash# debconf-show man-db
* man-db/install-setuid: false
  man-db/auto-update: false

更改设置并重新配置包:

echo "set man-db/auto-update true" | sudo debconf-communicate
sudo dpkg-reconfigure man-db

相关内容