Reinstall man pages & fix man

So in a recent fit of folly, I followed the instructions in this answer on the Ubuntu SE page since I wanted to remove most of the documentation. However, I didn’t read the commands well enough and missed that that those would also remove the man pages, which I didn’t want.

After the damage was done, I’m now trying to figure out how to recover from my mistake. After reinstalling man-db and manpages, it still does not work though. Currently, man cp for example only shows a bunch of

~
~ 
~

Exiting this view of the broken manpage leaves me with an error

man: command exited with status 3: /usr/lib/man-db/zsoelim | /usr/lib/man-db/manconv -f UTF-8:ISO-8859-1 -t UTF-8//IGNORE | preconv -e UTF-8 | tbl | nroff -mandoc -Tutf8

So even uninstalling certain packages and reinstalling still does not help this. Therefore, as far as I’m aware of this question is not a duplicate to questions like this one or this one .

Is anyone aware of an approach to fix this?

Answers:

Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

You need to remove the lines matching /usr/share/man and /usr/share/groff from /etc/dpkg/dpkg.cfg.d/01_nodoc, then reinstall groff, man-db, manpages and any other package whose manpages you want to restore. The cp manpage for example is in the coreutils package.

Method 2

This error message can be a symptom of a recent bug in a couple of distributions (eg: Debian, bug #890861), and this SO question appears in the first results from a google search.

The temporary workaround until the fix comes out is to export a variable, or to start man with said variable set:

eg:

MAN_DISABLE_SECCOMP=1 man man

or:

export MAN_DISABLE_SECCOMP=1
man man


All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x