Homebrew安装时遇到gfortran错误

3

我在尝试使用Homebrew安装gfortran时遇到了问题,希望能得到帮助。非常感谢您提前的帮助。

    bash-3.2$ brew install gfortran
    Warning: gfortran-4.8.0 already installed, it's just not linked
    bash-3.2$ brew link gfortran
    Linking /usr/local/Cellar/gfortran/4.8.0... Warning: Could not link gfortran. Unlinking...

    Error: Could not symlink file: /usr/local/Cellar/gfortran/4.8.0/share/gcc-4.8.0/python
    /libstdcxx/v6/printers.py
    Target /usr/local/share/gcc-4.8.0/python/libstdcxx/v6/printers.py already exists. 
    You may need to  delete it.
    To force the link and delete this file, do:
    brew link --overwrite formula_name

    To list all files that would be deleted:
    brew link --overwrite --dry-run formula_name
    bash-3.2$ 
1个回答

4
这似乎是另一个GCC 4.8安装程序(来自Homebrew或其他地方),正在与gfortran安装产生冲突。GFortran基于GCC,因此它们可能会发生碰撞。
Homebrew配方gcc48似乎与gfortran存在未记录的冲突。两者都想要将符号链接/ usr / local / share / gcc-4.8.0。我能够通过 brew tap homebrew / versions; brew install gcc48; brew install gfortran 重现您的错误。
前往GitHub上的Homebrew问题跟踪器报告此冲突为错误。
作为解决方法,如果您不需要GCC 4.8.0,请取消链接brew unlink gcc48(如果它来自homebrew)或卸载它,然后再尝试安装gfortran。
更新:看起来Homebrew团队已经意识到了这个问题。此修复已包含在此拉取请求中(#19382)

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