gpt4 book ai didi

macos - 如何使用brew链接到新的gcc版本?

转载 作者:行者123 更新时间:2023-12-04 10:07:27 25 4
gpt4 key购买 nike

我刚刚通过运行brew updatebrew upgrade获得了一个新的gcc版本。 brew提示brew link没有成功完成:

~
✓ brew upgrade
==> Upgrading 1 outdated package, with result:
gcc 4.8.2_1
==> Upgrading gcc
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/gcc-4.8.2_1
######################################################################## 100,0%
==> Pouring gcc-4.8.2_1.mavericks.bottle.tar.gz
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
You can try again using:
brew link gcc

Possible conflicting files are:
/usr/local/bin/gfortran -> /usr/local/Cellar/gfortran/4.8.2/bin/gfortran
/usr/local/share/man/man1/gfortran.1 -> /usr/local/Cellar/gfortran/4.8.2/share/man/man1/gfortran.1

所以我手动运行了 brew link gcc:
~
✓ brew link gcc
Linking /usr/local/Cellar/gcc/4.8.2... 25 symlinks created

现在,当我告诉brew进行清理时,会收到以下警告:
~
✓ brew cleanup
Warning: Skipping (old) /usr/local/Cellar/gcc/4.8.2 due to it being linked

我的地窖里有两个gcc版本:
~
✓ ls /usr/local/Cellar/gcc
4.8.2 4.8.2_1

我两个都需要吗?我想删除旧版本。我该如何实现?

最佳答案

我通过运行以下命令解决了

brew unlink gcc
brew rm gfortran
brew cleanup
brew link gcc

似乎gfortran已链接到旧版gcc版本。

关于macos - 如何使用brew链接到新的gcc版本?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23708389/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com