Can not install gfortran via homebrew
Asked Answered
L

1

28

I got this message when i tried to install gfortran.

~$ brew install gfortran
Error: No available formula for gfortran
GNU Fortran is now provided as part of GCC, and can be installed with:
  brew install gcc

My question is how to install gfortran with homebrew or port?

or

If now GNU Fortran is a part of GCC How can i compile fortran code using gcc?

I'm not sure may be i've misunderstood something i remember that the last time i still can use gfortran to compile my code but now it doesn't work.

Further information:

when i use command brew list i still see that gfortran is there but can not use it.

Further information (latest):

ok, now i can use gfortran command but another problem come

~$ gfortran-4.9 hello.f
dyld: Library not loaded: /usr/local/lib/libcloog-isl.4.dylib
  Referenced from: /usr/local/Cellar/gcc/4.9.2/libexec/gcc/x86_64-apple-darwin14.0.0/4.9.2/f951
  Reason: image not found
gfortran-4.9: internal compiler error: Trace/BPT trap: 5 (program f951)
Abort trap: 6
Loot answered 13/11, 2014 at 22:13 Comment(0)
S
35

Just do brew install gcc per the instructions. The gcc package contains gcc, g++, gfortran etc.

Semiliterate answered 14/11, 2014 at 4:12 Comment(2)
thank you very much for your answer now i can use gfortran command but another problem come.Loot
It appears that cloog is not installed or is not correctly linked into Homebrew's prefix. Please post the output of brew doctor to Gist or a pastebin and link to it.Winfredwinfrey

© 2022 - 2024 — McMap. All rights reserved.