0

I followed these instructions to add some manpages on my computer, but I still can't open it with man.

I set $MANPATH to /usr/local/man (export MANPATH=/usr/local/man in my ~/.zshrc, and sourced it) and copied my manpage files to /usr/local/man/man3. Yet man doesn't find the pages I want to access :

$ echo $MANPATH
/usr/local/man
$ tree /usr/local/man
/usr/local/man
└── man3
    ├── mlx.1
    ├── mlx_loop.1
    ├── mlx_new_image.1
    ├── mlx_new_window.1
    └── mlx_pixel_put.1

1 directory, 5 files
$ man mlx
No manual entry for mlx
$ man 3 mlx
No manual entry for mlx in section 3

Why do I get this error and what could I do?

Community
  • 1
  • 1
vmonteco
  • 14,136
  • 15
  • 55
  • 86

1 Answers1

1

It seems that the files are either in the wrong directory or have an incorrect extension. The directory name indicates that it contains manpages for section 3 (Library calls) but the filename extensions suggest that the manpages belong to section 1 (Executable programs or shell commands).

You should be able to check which is the case - for example for mlx.1 - with the following command

man /usr/local/man/man3/mlx.1

This should show the name of the manpage (probably in uppercase) followed by the section number in parentheses at the very beginning.

If it shows MLX(1) move the file mlx.1 into the directory /usr/local/man/man1 (or just rename man3 if all files belong to section 1). If it shows MLX(3), just rename the file to mlx.3.

Adaephon
  • 16,929
  • 1
  • 54
  • 71