How to fix "No manual entry for gcc"?

I somehow lost the man pages for gcc and g ++. I'm not sure where and what to look for. I am pretty sure that the character pages that once worked worked. It also works on my Mac at work, where I use roughly the same setting. Could there be a problem with brew? Or is this a bug in the Xcode command line tools?

Update: I just tried reinstalling the Xcode command line tools. Bad luck.

~ βœ“ man gcc No manual entry for gcc ~ βœ— which gcc /usr/bin/gcc ~ βœ“ gcc --version Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn) Target: x86_64-apple-darwin13.1.0 Thread model: posix 
+7
gcc homebrew manpage man macos
source share
3 answers

gcc is no longer installed Xcode, it really installs clang and calls it gcc

 usxxplayegm1:~ grady$ which gcc /usr/bin/gcc usxxplayegm1:~ grady$ /usr/bin/gcc --version Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 Apple LLVM version 5.1 (clang-503.0.38) (based on LLVM 3.4svn) Target: x86_64-apple-darwin13.0.2 Thread model: posix 

you need man clang

I thought it was a symbolic link, but ls -l does not display it as a symbolic link, so either it is a hard link or some other trick.

+9
source share

See how you installed MANPATH in your .profile . Instead, for example,

 export MANPATH=/opt/local/man:/usr/local/man 

you have to do

 export MANPATH="/opt/local/man:/usr/local/man:$MANPATH" 

And then (breathe) open a new terminal window.

Thus, your .profile does not destroy (or does not reflect the old version) the system method of installing MANPATH , which changes when you install (or reinstall) Xcode.

+1
source share

I am using High Sierra with g ++ 7.2 port. Configuring the MANPATH environment on / opt / local / man (or / opt / local / man / man1 , where g ++. Gz is found ). not a job. So, after ensuring that the g ++ soft link . Gz points to g ++ - mp-7.1.gz (there was no g ++ - mp-7.2.gz in the man1 directory, although g ++ 7.2 is my version), I always use the command:

 man /opt/local/share/man/man1/g++.gz 

which never fails. You can save the alias for this in .profile if you often use the man command for g ++.

+1
source share

All Articles