gfortran:错误尝试执行'f951':execvp:没有这样的文件或目录 [英] gfortran: error trying to exec 'f951': execvp: No such file or directory
问题描述
我试图编译在互联网上找到的代码。实际上,我试图编译在 http://www.cs.berkeley。 edu /〜fowlkes / BSE / 。
I'm trying to compile a code found on the internet. Actually I'm trying to compile the code found at http://www.cs.berkeley.edu/~fowlkes/BSE/.
我试图安装gfortran和所有其他库中需要编译它在我的MAC。但是,当我运行命令 make 时,会出现以下错误:
I tried to install gfortran and all the other libraries that are needed for compiling it in my MAC. But when I run the command make I get the following error:
$ make
(cd trlan && make -f Makefile.gcc)
gfortran -O3 -ffixed-line-length-132 -c dsort2.f
gfortran: error trying to exec 'f951': execvp: No such file or directory
make[1]: *** [dsort2.o] Error 1
make: *** [trlan/libtrlan.a] Error 2
我相信错误与我的c ++编译器版本有关,与gfortran不兼容。
I believed that the error is related to the version of my c++ compiler, that is not compatible with gfortran.
当我运行命令 gcc --version 时:
$ gcc --version
i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)
当我运行命令 gfortran --version 时:
$ gfortran --version
GNU Fortran (GCC) 4.8.0 20120930 (experimental)
我在运行命令 make 的目录下的Makefile位于: https://www.dropbox.com/s/q7mxvhnqg62ioum/Makefile.gcc
The Makefile under the directory that I'm running the command make is here: https://www.dropbox.com/s/q7mxvhnqg62ioum/Makefile.gcc
目录trlan下的Makefile位于: https://www.dropbox.com/s/ jydwpkg3f1upbgf / Makefile.gcc
The Makefile under the directory trlan is here: https://www.dropbox.com/s/jydwpkg3f1upbgf/Makefile.gcc
任何人都知道如何解决这个问题或如何找到可以帮助我解决这个问题的工具?
Anyone has an idea of how to solve this problem or how to find tools that can help me solve it?
我试着这样:
http://eftrunk.blogspot.com/2011/11/how-to-fix-error-trying-to-exec-f951.html
推荐答案
我发现的最简单的解决方案(可能不是最干净),是将f951链接到gfortran的二进制路径: / p>
The simplest solution I found (perhaps not cleanest), is to statically link f951 in the path to the binary of gfortran:
find /usr/local/ -name f951
对我来说:
/usr/local/gfortran/libexec/gcc/x86_64-apple-darwin11/4.6.2/f951
/usr/local/gfortran/libexec/gcc/x86_64-apple-darwin14/5.1.0/f951
所以我把一个链接放在/ usr / local / bin最适合我系统的链接上:
so I put a link to the one that fits my system most closely in /usr/local/bin:
sudo ln -s /usr/local/gfortran/libexec/gcc/x86_64-apple-darwin14/5.1.0/f951 /usr/local/bin/.
现在gfortran再次工作了。无需卸载XCode或任何其他夸张的工作负载。
And now gfortran works again. No need to uninstall XCode or any other exaggerated workload.
这篇关于gfortran:错误尝试执行'f951':execvp:没有这样的文件或目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!