Homebrew Octave在Mavericks系统中找不到gfortran。

4

我通过Homebrew安装了Octave和GCC。两个安装过程都没有返回任何错误,但是当我尝试运行Octave时,我遇到了以下错误:

dyld: Library not loaded: /usr/local/Cellar/gfortran/4.8.2/gfortran/lib/libgfortran.3.dylib
  Referenced from: /usr/local/lib/libqrupdate.1.dylib
  Reason: image not found
Trace/BPT trap: 5

我已经进行了brew update、upgrade等操作。Brew doctor只返回与man目录的所有权无关的消息。
Warning: Some directories in /usr/local/share/man aren't writable.
This can happen if you "sudo make install" software that isn't managed
by Homebrew. If a brew tries to add locale information to one of these
directories, then the install will fail during the link step.
You should probably `chown` them:
    /usr/local/share/man/de
    /usr/local/share/man/de/man1

有什么想法吗?我看到其他帖子建议取消链接/重新链接gcc,但对我来说没有任何改变。

3个回答

3

请重新安装qrupdate,命令为brew reinstall qrupdate。

在更新到gcc 4.9.1之后,该路径已更改。


2

在我的OSX Mavericks系统上,我无法使用Fortran。直到我执行以下命令后,问题才得以解决:

brew reinstall gcc49 --enable-fortran

这将为我提供/usr/local/bin/gfortran-4.9。然后,我手动创建了一个符号链接:

sudo ln -s /usr/local/bin/gfortran-4.9 /usr/local/bin/gfortran


0
经过长时间的寻找解决方案,这个方法对我有效:
brew install gcc49 --with-fortran

我发现这个安装程序将gfortran49安装为“gfortran-4.9”,而“gfortran”与我之前安装的gfortran48相关联。因此,我回去卸载了gfortran48:

brew remove gfortran

然后我重新安装了gcc49:

brew reinstall gcc49 --with-fortran

似乎已经起作用了。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接