What to do when mandb fails to update index cache during update?
Andrew Henderson
I ran a dist-upgrade today and this was the output:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded: gnome-mines libglib2.0-0 libglib2.0-0:i386 libglib2.0-bin libglib2.0-data libglib2.0-dev libglib2.0-doc libspice-server1 qtox
9 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.
Need to get 12.4 MB of archives.
After this operation, 4,531 kB disk space will be freed.
Do you want to continue? [Y/n] y
Get:1 xenial/main amd64 gnome-mines amd64 1:3.20.1-1~ubuntu16.04.1 [2,441 kB]
Get:2 xenial-updates/main amd64 libglib2.0-dev amd64 2.48.1-1~ubuntu16.04.1 [1,377 kB]
Get:3 nightly/wily amd64 qtox amd64 1.4.0-192-g279225c-1 [4,328 kB]
Get:4 xenial-updates/main amd64 libglib2.0-bin amd64 2.48.1-1~ubuntu16.04.1 [39.4 kB]
Get:5 xenial-updates/main i386 libglib2.0-0 i386 2.48.1-1~ubuntu16.04.1 [1,184 kB]
Get:6 xenial-updates/main amd64 libglib2.0-0 amd64 2.48.1-1~ubuntu16.04.1 [1,118 kB]
Get:7 xenial-updates/main amd64 libglib2.0-data all 2.48.1-1~ubuntu16.04.1 [132 kB]
Get:8 xenial-updates/main amd64 libglib2.0-doc all 2.48.1-1~ubuntu16.04.1 [1,471 kB]
Get:9 xenial-updates/main amd64 libspice-server1 amd64 0.12.6-4ubuntu0.1 [338 kB]
Fetched 12.4 MB in 15s (783 kB/s)
(Reading database ... 242183 files and directories currently installed.)
Preparing to unpack .../libglib2.0-data_2.48.1-1~ubuntu16.04.1_all.deb ...
Unpacking libglib2.0-data (2.48.1-1~ubuntu16.04.1) over (2.48.0-1ubuntu4) ...
Preparing to unpack .../libglib2.0-dev_2.48.1-1~ubuntu16.04.1_amd64.deb ...
Unpacking libglib2.0-dev (2.48.1-1~ubuntu16.04.1) over (2.48.0-1ubuntu4) ...
Preparing to unpack .../libglib2.0-bin_2.48.1-1~ubuntu16.04.1_amd64.deb ...
Unpacking libglib2.0-bin (2.48.1-1~ubuntu16.04.1) over (2.48.0-1ubuntu4) ...
Preparing to unpack .../libglib2.0-0_2.48.1-1~ubuntu16.04.1_i386.deb ...
De-configuring libglib2.0-0:amd64 (2.48.0-1ubuntu4) ...
Unpacking libglib2.0-0:i386 (2.48.1-1~ubuntu16.04.1) over (2.48.0-1ubuntu4) ...
Preparing to unpack .../libglib2.0-0_2.48.1-1~ubuntu16.04.1_amd64.deb ...
Unpacking libglib2.0-0:amd64 (2.48.1-1~ubuntu16.04.1) over (2.48.0-1ubuntu4) ...
Preparing to unpack .../gnome-mines_1%3a3.20.1-1~ubuntu16.04.1_amd64.deb ...
Unpacking gnome-mines (1:3.20.1-1~ubuntu16.04.1) over (1:3.20.0-2~ubuntu16.04.1) ...
Preparing to unpack .../libglib2.0-doc_2.48.1-1~ubuntu16.04.1_all.deb ...
Unpacking libglib2.0-doc (2.48.1-1~ubuntu16.04.1) over (2.48.0-1ubuntu4) ...
Preparing to unpack .../libspice-server1_0.12.6-4ubuntu0.1_amd64.deb ...
Unpacking libspice-server1:amd64 (0.12.6-4ubuntu0.1) over (0.12.6-4) ...
Preparing to unpack .../qtox_1.4.0-192-g279225c-1_amd64.deb ...
Unpacking qtox (1.4.0-192-g279225c-1) over (1.4.0-189-gfd2e585-1) ...
Processing triggers for man-db (2.7.5-1) ...
/usr/bin/mandb: warning: can't update index cache /var/cache/man/index.db: Resource temporarily unavailable
Processing triggers for libc-bin (2.23-0ubuntu3) ...
Processing triggers for hicolor-icon-theme (0.15-0ubuntu1) ...
Processing triggers for gnome-menus (3.13.3-6ubuntu3) ...
Processing triggers for mime-support (3.59ubuntu1) ...
Processing triggers for menu (2.1.47ubuntu1) ...
Setting up libglib2.0-data (2.48.1-1~ubuntu16.04.1) ...
Setting up libglib2.0-0:amd64 (2.48.1-1~ubuntu16.04.1) ...
Setting up libglib2.0-0:i386 (2.48.1-1~ubuntu16.04.1) ...
Setting up libglib2.0-bin (2.48.1-1~ubuntu16.04.1) ...
Setting up libglib2.0-dev (2.48.1-1~ubuntu16.04.1) ...
Setting up gnome-mines (1:3.20.1-1~ubuntu16.04.1) ...
Setting up libglib2.0-doc (2.48.1-1~ubuntu16.04.1) ...
Setting up libspice-server1:amd64 (0.12.6-4ubuntu0.1) ...
Setting up qtox (1.4.0-192-g279225c-1) ...
Processing triggers for desktop-file-utils (0.22-1ubuntu5) ...
Processing triggers for libc-bin (2.23-0ubuntu3) ...
Processing triggers for menu (2.1.47ubuntu1) ...You will see this error comes up:
Processing triggers for man-db (2.7.5-1) ...
/usr/bin/mandb: warning: can't update index cache /var/cache/man/index.db: Resource temporarily unavailableIs there any way I can tell why this happened (if there is not an obvious one)? And is there anything I can/need to do as it seems to have failed with updating the man index cache? I am running Ubuntu GNOME 16.04 with GNOME 3.20.
Information Update:
Running sudo mandb outputs:
Purging old database entries in /usr/share/man...
Processing manual pages under /usr/share/man...
Purging old database entries in /usr/share/man/en_CA...
Processing manual pages under /usr/share/man/en_CA...
Purging old database entries in /usr/share/man/km...
Processing manual pages under /usr/share/man/km...
Purging old database entries in /usr/share/man/sr...
Processing manual pages under /usr/share/man/sr...
Purging old database entries in /usr/share/man/be...
Processing manual pages under /usr/share/man/be...
Purging old database entries in /usr/share/man/ta...
Processing manual pages under /usr/share/man/ta...
Purging old database entries in /usr/share/man/ne...
Processing manual pages under /usr/share/man/ne...
Purging old database entries in /usr/share/man/lt...
Processing manual pages under /usr/share/man/lt...
Purging old database entries in /usr/share/man/ms...
Processing manual pages under /usr/share/man/ms...
Purging old database entries in /usr/share/man/hi...
Processing manual pages under /usr/share/man/hi...
Purging old database entries in /usr/share/man/et...
Processing manual pages under /usr/share/man/et...
Purging old database entries in /usr/share/man/zh_TW...
Processing manual pages under /usr/share/man/zh_TW...
Purging old database entries in /usr/share/man/de.UTF-8...
Processing manual pages under /usr/share/man/de.UTF-8...
Purging old database entries in /usr/share/man/ja...
Processing manual pages under /usr/share/man/ja...
Purging old database entries in /usr/share/man/tr...
Processing manual pages under /usr/share/man/tr...
Purging old database entries in /usr/share/man/bg...
Processing manual pages under /usr/share/man/bg...
Purging old database entries in /usr/share/man/az...
Processing manual pages under /usr/share/man/az...
Purging old database entries in /usr/share/man/ps...
Processing manual pages under /usr/share/man/ps...
Purging old database entries in /usr/share/man/pa...
Processing manual pages under /usr/share/man/pa...
Purging old database entries in /usr/share/man/nl...
Processing manual pages under /usr/share/man/nl...
Purging old database entries in /usr/share/man/th...
Processing manual pages under /usr/share/man/th...
Purging old database entries in /usr/share/man/es...
Processing manual pages under /usr/share/man/es...
Purging old database entries in /usr/share/man/zh_CN...
Processing manual pages under /usr/share/man/zh_CN...
Purging old database entries in /usr/share/man/da...
Processing manual pages under /usr/share/man/da...
Purging old database entries in /usr/share/man/pl...
Processing manual pages under /usr/share/man/pl...
Purging old database entries in /usr/share/man/fi...
Processing manual pages under /usr/share/man/fi...
Purging old database entries in /usr/share/man/fr...
Processing manual pages under /usr/share/man/fr...
Purging old database entries in /usr/share/man/fa...
Processing manual pages under /usr/share/man/fa...
Purging old database entries in /usr/share/man/fy...
Processing manual pages under /usr/share/man/fy...
Purging old database entries in /usr/share/man/lv...
Processing manual pages under /usr/share/man/lv...
Purging old database entries in /usr/share/man/en_AU...
Processing manual pages under /usr/share/man/en_AU...
Purging old database entries in /usr/share/man/cs...
Processing manual pages under /usr/share/man/cs...
Purging old database entries in /usr/share/man/sk...
Processing manual pages under /usr/share/man/sk...
Purging old database entries in /usr/share/man/sl...
Processing manual pages under /usr/share/man/sl...
Purging old database entries in /usr/share/man/gl...
Processing manual pages under /usr/share/man/gl...
Purging old database entries in /usr/share/man/zh_HK...
Processing manual pages under /usr/share/man/zh_HK...
Purging old database entries in /usr/share/man/io...
Processing manual pages under /usr/share/man/io...
Purging old database entries in /usr/share/man/ca...
Processing manual pages under /usr/share/man/ca...
Purging old database entries in /usr/share/man/he...
Processing manual pages under /usr/share/man/he...
Purging old database entries in /usr/share/man/pt...
Processing manual pages under /usr/share/man/pt...
Purging old database entries in /usr/share/man/cy...
Processing manual pages under /usr/share/man/cy...
Purging old database entries in /usr/share/man/oc...
Processing manual pages under /usr/share/man/oc...
Purging old database entries in /usr/share/man/bs...
Processing manual pages under /usr/share/man/bs...
Purging old database entries in /usr/share/man/ro...
Processing manual pages under /usr/share/man/ro...
Purging old database entries in /usr/share/man/hu...
Processing manual pages under /usr/share/man/hu...
Purging old database entries in /usr/share/man/ce...
Processing manual pages under /usr/share/man/ce...
Purging old database entries in /usr/share/man/ja.UTF-8...
Processing manual pages under /usr/share/man/ja.UTF-8...
Purging old database entries in /usr/share/man/te...
Processing manual pages under /usr/share/man/te...
Purging old database entries in /usr/share/man/ku...
Processing manual pages under /usr/share/man/ku...
Purging old database entries in /usr/share/man/kk...
Processing manual pages under /usr/share/man/kk...
Purging old database entries in /usr/share/man/gd...
Processing manual pages under /usr/share/man/gd...
Purging old database entries in /usr/share/man/id...
Processing manual pages under /usr/share/man/id...
Purging old database entries in /usr/share/man/eo...
Processing manual pages under /usr/share/man/eo...
Purging old database entries in /usr/share/man/pt_BR...
Processing manual pages under /usr/share/man/pt_BR...
Purging old database entries in /usr/share/man/ug...
Processing manual pages under /usr/share/man/ug...
Purging old database entries in /usr/share/man/it...
Processing manual pages under /usr/share/man/it...
Purging old database entries in /usr/share/man/ko...
Processing manual pages under /usr/share/man/ko...
Purging old database entries in /usr/share/man/fr.ISO8859-1...
Processing manual pages under /usr/share/man/fr.ISO8859-1...
Purging old database entries in /usr/share/man/shn...
Processing manual pages under /usr/share/man/shn...
Purging old database entries in /usr/share/man/hy...
Processing manual pages under /usr/share/man/hy...
Purging old database entries in /usr/share/man/mhr...
Processing manual pages under /usr/share/man/mhr...
Purging old database entries in /usr/share/man/se...
Processing manual pages under /usr/share/man/se...
Purging old database entries in /usr/share/man/fr.UTF-8...
Processing manual pages under /usr/share/man/fr.UTF-8...
Purging old database entries in /usr/share/man/de...
Processing manual pages under /usr/share/man/de...
Purging old database entries in /usr/share/man/ca@valencia...
Processing manual pages under /usr/share/man/ca@valencia...
Purging old database entries in /usr/share/man/sq...
Processing manual pages under /usr/share/man/sq...
Purging old database entries in /usr/share/man/nn...
Processing manual pages under /usr/share/man/nn...
Purging old database entries in /usr/share/man/bo...
Processing manual pages under /usr/share/man/bo...
Purging old database entries in /usr/share/man/uk...
Processing manual pages under /usr/share/man/uk...
Purging old database entries in /usr/share/man/eu...
Processing manual pages under /usr/share/man/eu...
Purging old database entries in /usr/share/man/ar...
Processing manual pages under /usr/share/man/ar...
Purging old database entries in /usr/share/man/hr...
Processing manual pages under /usr/share/man/hr...
Purging old database entries in /usr/share/man/vi...
Processing manual pages under /usr/share/man/vi...
Purging old database entries in /usr/share/man/el...
Processing manual pages under /usr/share/man/el...
Purging old database entries in /usr/share/man/zh...
Processing manual pages under /usr/share/man/zh...
Purging old database entries in /usr/share/man/si...
Processing manual pages under /usr/share/man/si...
Purging old database entries in /usr/share/man/uz...
Processing manual pages under /usr/share/man/uz...
Purging old database entries in /usr/share/man/fr_CA...
Processing manual pages under /usr/share/man/fr_CA...
Purging old database entries in /usr/share/man/my...
Processing manual pages under /usr/share/man/my...
Purging old database entries in /usr/share/man/sv...
Processing manual pages under /usr/share/man/sv...
Purging old database entries in /usr/share/man/fo...
Processing manual pages under /usr/share/man/fo...
Purging old database entries in /usr/share/man/nb...
Processing manual pages under /usr/share/man/nb...
Purging old database entries in /usr/share/man/ml...
Processing manual pages under /usr/share/man/ml...
Purging old database entries in /usr/share/man/en_GB...
Processing manual pages under /usr/share/man/en_GB...
Purging old database entries in /usr/share/man/bn...
Processing manual pages under /usr/share/man/bn...
Purging old database entries in /usr/share/man/ast...
Processing manual pages under /usr/share/man/ast...
Purging old database entries in /usr/share/man/ru...
Processing manual pages under /usr/share/man/ru...
Processing manual pages under /usr/local/man...
0 man subdirectories contained newer manual pages.
0 manual pages were added.
0 stray cats were added.
0 old database entries were purged. 5 1 Answer
This error indicates that more than one mandb process was running at the same time and thus part of the cache update has failed. It is impossible really to know which part of the installation process had 2 or more calls on the cache leading to the failure.
If there is some concern that the man page database is incomplete the following command will refresh the database:
sudo mandbRunning this reveals the refresh process at work:
Purging old database entries in /usr/share/man/fr_CA...
Processing manual pages under /usr/share/man/fr_CA...
Purging old database entries in /usr/share/man/sq...
Processing manual pages under /usr/share/man/sq...If however the mandb database has become corrupt, which is very unlikely in the scenario that you have mentioned, you can try running the more radical command:
sudo mandb --createFrom the man pages for mandb:
-c, --create By default, mandb will try to update any previously created databases. If a database does not exist, it will create it. This option forces mandb to delete previous databases and re- create them from scratch, and implies --no-purge. This may be necessary if a database becomes corrupt or if a new database storage scheme is introduced in the future.When you will run this command you will see that a whimsical developer has used the idea of searching for stray cats in the effort to recreate and rebuild the database:
Processing manual pages under /usr/share/man/hr...
Updating index cache for path `/usr/share/man/hr/man1'. Wait...done.
Checking for stray cats under /usr/share/man/hr...
Checking for stray cats under /var/cache/man/hr...:)
References: