8

When I try to get the manpages with man it seems to display nothing and behaves as though I just pressed enter

~$ man ls
~$ man man

I have tried solutions from these pages to no avail question1 question2. This last question matches my condition exactly but the fixes doesn't seem to work. Although info seems to work.

Here are some additional information:

~$ man --version
man 2.7.6.1

~$ type -p man
/usr/bin/man

~$ type -t man
file

~$ manpath
/home/abhilash/anaconda3/man:/usr/local/man:/usr/local/share/man:/usr/share/man:/usr/lib/jvm/java-8-oracle/man

~$ uname -a
Linux abhilash-ThinkPad-T440 4.13.0-38-generic #43-Ubuntu SMP Wed Mar 14 15:20:44 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

UPDATE

~$ type -a man
man is /usr/bin/man

~$ env | grep 'PAGER\|^MAN'
~$ 

UPDATE 2

~$ ls -1 /usr/share/man/man1 | wc -l
2145

~$ ls -l "$(type -p pager)"
lrwxrwxrwx 1 abhilash abhilash 18 Apr 16 18:43 /home/abhilash/anaconda3/bin/pager -> ../lib/R/bin/pager

~$ ls -l "$(readlink "$(type -p pager)")"
ls: cannot access '../lib/R/bin/pager': No such file or directory
6
  • Show also: type -a man and env | grep 'PAGER\|^MAN' Apr 19, 2018 at 15:31
  • I've added them as an update
    – Abhilash
    Apr 19, 2018 at 15:39
  • Do you have any files in /usr/share/man/man1/?
    – terdon
    Apr 19, 2018 at 16:01
  • 2
    How about ls -l "$(type -p pager)" and (assuming it is a symlink): ls -l "$(readlink "$(type -p pager)")" Apr 19, 2018 at 16:04
  • @terdon : I have 2145 files in that folder.
    – Abhilash
    Apr 19, 2018 at 16:12

1 Answer 1

8

Turns out, after the anaconda installation or some package installation through conda, the default pager is re-written. The exact cause of this is unknown. Just some more information

~$ anaconda --version
anaconda Command line client (version 1.6.9)
~$ conda --version 
conda 4.4.10
~$ history | grep conda
  108  bash Anaconda3-5.1.0-Linux-x86_64.sh 
  110  anaconda-navigator
  181  anaconda-navigator
  187  anaconda-navigator
  311  conda info --envs
  312  conda install rpy2
  313  conda search PySide
  314  conda search Python
  366  conda install findspark
  367  conda info --envs
  370  conda install findspark
  373  conda search findspark
  374  conda install -c conda-forge findspark 
  495  anaconda --version
  496  conda --version 
  497  conda list
  499  history | grep conda

My strongest guess is that rpy2 installation had this effect of changing the pager information given the time of events.

But these are the steps I took to solve the issue.

~$ update-alternatives --display pager
pager - auto mode
  link best version is /bin/less
  link currently points to /bin/less
  link pager is /usr/bin/pager
  slave pager.1.gz is /usr/share/man/man1/pager.1.gz
/bin/less - priority 77
  slave pager.1.gz: /usr/share/man/man1/less.1.gz
/bin/more - priority 50
  slave pager.1.gz: /usr/share/man/man1/more.1.gz

~$ rm /home/abhilash/anaconda3/bin/pager

Ensure that the pager defaults to the one that came with man-db by typing the following to confirm

~$ ls -l "$(type -p pager)"
lrwxrwxrwx 1 root root 23 Apr  9 13:57 /usr/bin/pager -> /etc/alternatives/pager

This solution was arrived at after going through this link in an attempt to set the pager to default.

Thanks to glenn and terdon for their inputs in solving this issue.

6
  • 3
    +1 for both your Q and A. Don't forget to click the check mark next to your answer in 40 hours or so when it let's you. Apr 19, 2018 at 19:52
  • Just the rm /home/abhilash/anaconda3/bin/pager would have probably done it.
    – Aaron Hall
    Jun 7, 2018 at 21:00
  • 1
    For this this was caused by Microsoft R Open.... which pager showed that I wasn't using /usr/bin/pager. Just had to correct my $PATH order and it was fixed.
    – WillZ
    Jun 15, 2018 at 23:11
  • @WillZ is this more of an Anaconda problem or an R problem?
    – Aaron Hall
    Oct 1, 2018 at 17:29
  • @AaronHall I can't remember exactly, as far as I can recall for me it happened after I installed MRO.
    – WillZ
    Oct 2, 2018 at 20:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .