gfortran:尝试执行“f951"时出错:execvp:没有这样的文件或目录 [英] gfortran: error trying to exec 'f951': execvp: No such file or directory

查看:63
本文介绍了gfortran:尝试执行“f951"时出错:execvp:没有这样的文件或目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试编译在 Internet 上找到的代码.实际上,我正在尝试编译在 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 中编译它所需的所有其他库.但是当我运行命令 ma​​ke 时,我收到以下错误:

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)

我运行命令 ma​​ke 所在目录下的 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 的二进制文件:

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屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆