I recently updated the 2020 M1 Macbook pro I use for school to macOS Ventura, 13.4.1. Since then, I haven't been able to access C standard library man pages from the terminal. Any idea how I can regain access to the man pages?
For example, typing 'man 2 exit' just returns 'no manual entry for exit'. I have downloaded homebrew and xcode, but just downloading these resources hasn't fixed the problem.
Edit: I meant 'man 3 exit'.
The pages you're looking for are distributed with Xcode.
manfinds them usingxcode-select --show-manpaths, so try running that to see if everything is installed correctly. On my machine, theexit(3)page is in/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/share/man/man3/exit.3.How do I know that? Well,
manis open source. You can go look at how it works. (And it's just a shell script.)Also useful, you can pass
-d(or-dd) to get information about wheremanis looking for things and where it find them.My guess is that
xcode-selectisn't set up properly. It might point to some uninstalled version. In that case usexcode-select -sto set the correct version as default. If you use multiple versions of Xcode, I highly recommend Xcodes.app, which does a great job of maintaining that correctly.