无法通过自制软件安装 gfortran [英] Can not install gfortran via homebrew
问题描述
我在尝试安装 gfortran 时收到此消息.
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
我的问题是如何使用自制软件或端口安装 gfortran?
My question is how to install gfortran with homebrew or port?
或
如果现在 GNU Fortran 是 GCC 的一部分,我如何使用 gcc 编译 fortran 代码?
If now GNU Fortran is a part of GCC How can i compile fortran code using gcc?
我不确定我是否误解了一些东西,我记得上次我仍然可以使用 gfortran 编译我的代码,但现在它不起作用.
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.
更多信息:
当我使用命令 brew list
我仍然看到 gfortran 在那里但不能使用它.
when i use command brew list
i still see that gfortran is there but can not use it.
更多信息(最新):
好的,现在我可以使用 gfortran
命令了,但是又出现了一个问题
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
推荐答案
只需按照说明执行brew install gcc"即可.gcc包包含gcc、g++、gfortran等.
Just do "brew install gcc" per the instructions. The gcc package contains gcc, g++, gfortran etc.
这篇关于无法通过自制软件安装 gfortran的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!