2

My man command is not working at all on my Ubuntu 18.04 machine. Unlike most of the cases I have found described in the internet, where there is an error message after calling man, I do not get any output/ error message at all

If I type which man

I will get /usr/bin/man. And I have checked with echo PATH that/usr/bin is on my PATH.

I have already tried sudo apt install --reinstall man-db, restarted the terminal, but no success.

Does anyone know what the problem can be?

  • What do you get if you try whereis man ? This should provide any locations for man, plus the locations for the manual pages (for the command man) – guiverc Nov 21 '18 at 9:54
  • I get man: /usr/bin/man /usr/local/man /usr/share/man /usr/share/man/man1/man.1.gz /usr/share/man/man7/man.7.gz None of them work by calling man with the full path (some are directories). But the which command will tell me which man linux will call when calling man, right? As I described in my question it is /usr/bin/man, which is in my $PATH – BCArg Nov 21 '18 at 10:02
  • maybe you can run strace man and then paste the debug info in some nopaste site?(since the info would be long) – Alvin Liang Nov 21 '18 at 10:12
  • I would check you have some free disk space (df -h) in case it needs it to operate. Next I would dpkg -S /usr/bin/man to ensure your found program comes from man-db (as expected). I'm not sure what you mean by "calling man with the full path" as to access page 1 you man 1 man, to access page 7 man 7 man (which doesn't use the path; unless you meant /usr/bin/man 1 man to view page 1). If you check file type of your binary (ie. file /usr/bin/man) do you get a ELF LSB shared object dyn.linked of correct architecture? – guiverc Nov 21 '18 at 10:52
  • To answer your comments: 1. space should not be a problem, 2. calling man with the full path I mean typing /usr/bin/man instead of just man. But, again, this does not work either. 3. the output of file /usr/bin/man is ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=c80771d215f4d9df4bf138ec9cfbf23bc58c950d, stripped – BCArg Nov 21 '18 at 11:24
1

I had the same problem and I solved it by running the following command:

sudo man <command>
  • It works, but why does it only work with sudo? – wordsforthewise May 8 at 22:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.