2

I download the gcc, use brew install gcc but it said the gcc did not linked. how to link the gcc? or what should I do?

  • 2
    I'd run the brew doctor command and fix anything it points up. However I just tried brew install gcc myself and it worked first time. Could you tell us the exact error message you're getting? Is it brew telling you that it didn't link or gcc telling you that? – Alistair McMillan May 10 '17 at 20:07
1

When you install gcc with :

brew install gcc

it should be automatically linked. But, if for some reasons, it's not. You can link it manually with :

brew link gcc

The command :

brew link --help

gives also some valuable information :

brew ln, link [--overwrite] [--dry-run] [--force] formula:
    Symlink all of formula's installed files into the Homebrew prefix. This
    is done automatically when you install formulae but can be useful for DIY
    installations.

    If --overwrite is passed, Homebrew will delete files which already exist in
    the prefix while linking.

    If --dry-run or -n is passed, Homebrew will list all files which would
    be linked or which would be deleted by brew link --overwrite, but will not
    actually link or delete any files.

    If --force (or -f) is passed, Homebrew will allow keg-only formulae to be linked.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .