1

I'm on Windows 10 but using bash and MSYS2 (mingw64). I just installed man using MSYS2. The problem is when typing a command like man echo (can be any command; it doesn't have to be echo), I get this error:

“man: can't open the manpath configuration file /etc/man_db.conf”

The file exists. Weirdly, if I run the command in cmd it works.

I have bash installed both via MSYS2 and via git. Actually I've been having a lot of headaches because of duplicate installations from git and MSYS2 but now is not the time to tell all those stories.

I use the bash that comes installed with git and not with MSYS2 and I have my reasons for keeping it that way. But this error doesn't occur if I were to use the bash I have from MSYS2. Over there man works fine.

I read over the man options and tried playing with a few different paths using the --manpath option but no luck.

I also tried copy-pasting the man_db.conf from my msys64/etc folder to the Git/etc folder. This did make the error go away but instead man displays nothing then a bunch of tildes, so it's not really a solution. Also pursuing this solution means I will have to modify my git installation which is not a good idea.

EDIT: Better solutions still welcome but for now I found a workaround. Because man works in cmd, I added the following alias to my .bashrc:

alias man='MSYS_NO_PATHCONV=1 cmd /c man'

0

0

You must log in to answer this question.

Browse other questions tagged .