Can't read man pages

when I enter man man I get this error

[ms@manjaro ~]$ man man sh: line 1: bat: command not found man: command exited with status 127: sed -e '/^[[:space:]]*$/{ N; /^[[:space:]]*\n[[:space:]]*$/D; }' | LESS=-ix8RmPm Manual page man(1) ?ltline %lt?L/%L.:byte %bB?s/%s..?e (END):?pB %pB\%.. (press h for help or q to quit)$PM Manual page man(1) ?ltline %lt?L/%L.:byte %bB?s/%s..?e (END):?pB %pB\%.. (press h for help or q to quit)$ MAN_PN=man(1) sh -c col -bx | bat -l man -p

how can I fix this?

Hi. Try to figure out what happened to the man command. Run from terminal:
which man
and
file /usr/bin/man
and see what you get.

which man
output
/usr/bin/man

file /usr/bin/man
output
➜ file /usr/bin/man /usr/bin/man: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=53450264ac0800764530b5fbfd96896ab1a66e3b, for GNU/Linux 4.4.0, stripped

That seems OK. Maybe you should check default pager for man:
which less
and
file /usr/bin/less

➜ file /usr/bin/less /usr/bin/less: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=a95fadef9e4175a99b8d75739af53c4c97afb948, for GNU/Linux 4.4.0, stripped

Do you have any idea about what can that be? Have you done something with sed recently?

/usr/bin/less

Nah. I’m on a pretty new installation of manjaro xfce but I have installed someone else’s dwm build

one more thing. I’m using st and i get no errors when I use xfce4-terminal

I can only guess that is the cause of the problem. I’m out of ideas how to find what in particular is broken.

EDIT.

Hm. In that case the problem is not with man, but with st.

EDIT 2. I’ve edited the title to indicate that.

i restarted the xfce4-terminal and have started getting the same sed error when I enter the man command. no matter which terminal i use i get the same error

Try re-installing the software with:

sudo pacman -S man-db

same error. already tried reinstalling it.
EDIT: I fixed the error by deleting a line from my fish config.
set -x MANPAGER "sh -c 'col -bx | bat -l man -p'"

Did you set it there?

if i had set it there then I wouldn’t have showed up here asking for help.
(using someone else’s dotfiles)

Well, it’s a user change at any rate. My question was related to if it’s how it’s provided by the source or a customization. Answer was costumization. Thanks. :slight_smile:

2 Likes

If you want to fix the error and use that particular customization, you should probably install bat

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.