Search code examples
cmanpage

How to install man pages for C standard library functions in Mac OS X


I want to see the man page of some c standard library functions in Mac OS X. When I typed in man setsockopt, it returns: No manual entry for setsockopt. Does that mean I haven't installed man pages for c standard? How should I install it?


Solution

  • macOS is not feature complete out of the box when it comes to development. Installing the Xcode command line tools will give you what you need, as well as a compiler etc.

    For macOS and newer versions of Mac OS X, installing the Command Line Tools package is done with the command xcode-select --install.

    For older versions of Mac OS X you'll need to install Xcode (free in the Mac App Store) first. Then you can install the Command Line Tools module after you installed Xcode, by going into Xcode->Preferences->Downloads->Components