5

I wanted to see gcc's maual but

$ man gcc
No manual entry for gcc
See 'man 7 undocumented' for help when manual pages are not available.
$ man gcc-XX
No manual entry for gcc-XX
$sudo nano /etc/apt/sources.list
deb http://raspbian.raspberrypi.org/raspbian/ stretch main contrib non-free rpi
deb-src http://raspbian.raspberrypi.org/raspbian/ stretch main contrib non-free$
#deb http://apt.adafruit.com/raspbian/ stretch main
$ sudo apt-get update
$ sudo apt-get --reinstall install man gcc
$ man gcc
#same as above

Where's the problem? Should i change sources.list.d/raspi.list?

6

The documentation for GCC is actually contained in its own package1, gcc-doc.

Just run:

sudo apt-get install gcc-doc

and then man gcc will work as expected.

Note that your attempt, sudo apt-get --reinstall install man gcc asks apt-get to try and install two packages, man and gcc. man doesn't exist as a package in the repositories, and gcc will just be reinstalled as you've asked, but it won't find the manual for GCC doing that. You cannot use apt-get in that way, unfortunately.


1 gcc-doc is actually a metapackage which just depends on the relevant version of the docs (e.g. gcc-6-doc for Stretch, gcc-4.9-doc for Jessie, etc). This means that you should get the right version of the docs by default, although you can also verify that the version is correct as described by joan below.

  • 1
    You probably need to get a package against the gcc version, e.g. gcc-6-doc if gcc -v reports you are using version 6. – joan Aug 30 '18 at 14:36
  • sorry if i'm bad, it's my first question here. Sorry! – SuperPizz Sep 4 '18 at 12:34
  • i installed gcc-6-doc and run man gcc and it worked! – SuperPizz Sep 4 '18 at 12:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.