1

I found What do the numbers in a man page mean? which explains the sections for command/library documentation quite nicely, and I was looking at the output for man regex and noticed the See Also referred to regex(3).

I tried to run man 3 regex, but got the following message:

No manual page for regex in section 3

My question is - where is it?

This is on Ubuntu 10.04 if that makes a difference.

HorusKol
  • 133

4 Answers4

4

REGEX(3)

NAME regcomp, regexec, regerror, regfree - POSIX regex functions

Works fine here on Arch Linux and also on the Internet...

You might need to (re)install them:

sudo apt-get install manpages manpages-dev manpages-posix manpages-posix-dev
jasonwryan
  • 73,126
4

In Ubuntu this man page belongs to manpages-dev package.

Slava Semushin
  • 807
  • 7
  • 8
4

You need to install the manpages-dev package:

$ dpkg -S /usr/share/man/man7/regex.7.gz
manpages: /usr/share/man/man7/regex.7.gz

$ dpkg -S /usr/share/man/man3/regex.3.gz
manpages-dev: /usr/share/man/man3/regex.3.gz

Practically all the man pages in sections 2 and 3 come from the manpages-dev package.

I guess this is because they take up about 20 MB, and some users don't need them.

(There are also some man pages provided by the various *-dev packages and programming language specific packages, e.g. *-perl.)

If ever you can't find a file, but you know part of its name, apt-file can help:

$ apt-file search regex.3.gz
...
manpages-dev: /usr/share/man/man3/regex.3.gz
...
Mikel
  • 57,299
  • 15
  • 134
  • 153
0

On my gentoo system man regex only gives me the section 3 (POSIX syscall) man page. (What manual section did your man regex retrieve it's man page? Just curious.)

Running a equery belongs /usr/include/regex.h on my system reveals that that header file is part of the sys-libs/glibc package. Similarly, by running the command equery belongs /usr/share/man/man3/regex.3.bz3 I found out that the man page for the regex.h file is provided by the package sys-apps/man-pages.

Now, I imagine Gentoo and Ubuntu might have different ways of organizing their manfiles, but I think it is worth a shot for you to check if you got some man-page related package not installed on your host. I take for granted that your machine has Ubuntu's glibc package installed (otherwise I would find it hard to believe that your system even boots up), you should have the file /usr/include/regex.h available on your system (unless Ubuntu has decided to have it elsewhere, like /usr/local/include/regex.h).

IllvilJa
  • 256
  • 2
  • 7