Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
702 views
in Technique[技术] by (71.8m points)

fortran - Can not install gfortran via homebrew

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
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...