dyld:未加载库:@ rpath / libgfortran.3.dylib

问题描述 投票:0回答:1

我正在尝试学习Fortran编程语言,作为测试,我编写了一个像这样的简单程序:

!Fortran Program
program first
print *, "Hello World"
end program first

然后我将此代码文件放入mac终端并运行gfortran first.f95,然后按预期给了我输出a.out。但是,当我尝试通过导航到输出目录并键入./a.out在终端中运行输出时。它给了我这个错误输出:

dyld: Library not loaded: @rpath/libgfortran.3.dylib
  Referenced from: /Users/liang/Desktop/Programs/Fortran/Test/a.out
  Reason: image not found

liang是我的用户名。

macos terminal fortran gfortran dyld
1个回答
0
投票

我有同样的问题,而导致问题的原因是该库不在默认路径中,而是“ anaconda”进入了该路径,因此这就是编译器无法加载它的原因。我是一个纯粹的业余用户,所以我可能无法用专业术语来解释。

© www.soinside.com 2019 - 2024. All rights reserved.