Can not install gfortran via homebrew

巧了我就是萌 提交于 2019-11-27 03:10:34

问题


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

回答1:


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



来源:https://stackoverflow.com/questions/26919450/can-not-install-gfortran-via-homebrew

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!