xcode 4.2 的 gfortran 自制软件安装失败

发布于 2024-12-09 20:14:42 字数 1183 浏览 0 评论 0原文

我安装了 xcode4.2,因此,我无法通过自制程序安装 gfortran。

这是错误:

calvin$ brew -v install gfortran
Homebrew 0.8
==> Downloading http://r.research.att.com/gfortran-lion-5666-3.pkg
/usr/bin/curl -f#LA Homebrew 0.8 (Ruby 1.8.7-249; Mac OS X 10.7.2) http://r.research.att.com    /gfortran-lion-5666-3.pkg -o /Users/calvin/Library/Caches/Homebrew/gfortran-4.2.4-5666.3.pkg
######################################################################## 100.0%^[[B
/usr/bin/xar -xf /Users/calvin/Library/Caches/Homebrew/gfortran-4.2.4-5666.3.pkg 
mv *.pkg/Payload Payload.gz 
ls | grep -v Payload | xargs rm -r 
/usr/bin/gcc
Error: Currently the gfortran compiler provided by this brew is only supported
for:

  - XCode 3.1.4 on OS X 10.5.x
  - XCode 3.2.2/3.2.3 -- 4.0 on OS X 10.6.x
  - XCode 4.1 on OS X 10.7.x

The AppStore and Software Update can help upgrade your copy of XCode.
The latest version of XCode is also available from:

http://developer.apple.com/technologies/xcode.html
rmdir: /usr/local/Cellar/gfortran/4.2.4-5666.3 (empty)
Error: Nothing was installed to /usr/local/Cellar/gfortran/4.2.4-5666.3

我怎样才能让它工作(使用 xcode 4.2,降级我的 xcode 4.2 并不是一个好的选择)?

I have xcode4.2 installed and because of that, I am unable to get gfortran installed via homebrew.

Here's the error:

calvin$ brew -v install gfortran
Homebrew 0.8
==> Downloading http://r.research.att.com/gfortran-lion-5666-3.pkg
/usr/bin/curl -f#LA Homebrew 0.8 (Ruby 1.8.7-249; Mac OS X 10.7.2) http://r.research.att.com    /gfortran-lion-5666-3.pkg -o /Users/calvin/Library/Caches/Homebrew/gfortran-4.2.4-5666.3.pkg
######################################################################## 100.0%^[[B
/usr/bin/xar -xf /Users/calvin/Library/Caches/Homebrew/gfortran-4.2.4-5666.3.pkg 
mv *.pkg/Payload Payload.gz 
ls | grep -v Payload | xargs rm -r 
/usr/bin/gcc
Error: Currently the gfortran compiler provided by this brew is only supported
for:

  - XCode 3.1.4 on OS X 10.5.x
  - XCode 3.2.2/3.2.3 -- 4.0 on OS X 10.6.x
  - XCode 4.1 on OS X 10.7.x

The AppStore and Software Update can help upgrade your copy of XCode.
The latest version of XCode is also available from:

http://developer.apple.com/technologies/xcode.html
rmdir: /usr/local/Cellar/gfortran/4.2.4-5666.3 (empty)
Error: Nothing was installed to /usr/local/Cellar/gfortran/4.2.4-5666.3

How can I get this working (using xcode 4.2, downgrading my xcode 4.2 isn't really a good option) ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

短叹 2024-12-16 20:14:42

根据我的经验,自制程序是在 OS X 上获取 gfortran 的最差选择。

您是否尝试过此页面中的二进制文件?

另一个选择是 MacPorts。你也可以自己从源代码编译gfortran。对于 XCode 3,这并不困难。但是,由于默认的 LLVM 编译器,XCode 4 的情况可能有所不同。

有什么具体原因让您使用最新版本的 XCode 吗?首先尝试二进制文件。我没有使用 XCode 4 测试它们,但是...如果您尝试,请告诉我们。

Homebrew in my experience is the worst option to obtain gfortran on OS X.

Did you try binaries from this page?

Another option is MacPorts. And you can also compile gfortran from sources by yourself. It's not that difficult with XCode 3. However the story might be different with XCode 4, because of the default LLVM-compiler.

Is there any specific reason to use the latest version of XCode for you? Try binaries first. I didn't test them with XCode 4 but... Let us know if you try.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文