无法在 MacOSX 10.6 上安装 ruby​​ 1.9.1

发布于 2024-08-19 03:38:59 字数 716 浏览 2 评论 0原文

我似乎无法在 Mac 上安装 Ruby。到目前为止,我已经采取了以下步骤:

  1. 从 Ruby 站点 (http:// /www.ruby-lang.org/en/downloads/
  2. 解压运行 { tar xzvf ruby​​-1.9.1-p376.tar.gz }
  3. 进入新的 ruby​​ 文件夹,并使用 {./configure 进行配置这

就是错误发生的地方。当我运行配置时,它给出了错误:

/usr/local/include/fuse/fuse_common.h:32:2: error: #error Please add -D_FILE_OFFSET_BITS=64 to your compile flags!
In file included from /usr/local/include/fuse/fuse.h:857,
                 from <command-line>:0:
/usr/local/include/fuse/fuse_compat.h:69:24: error: sys/statfs.h: No such file or directory

因此,我无法制作包也无法安装它。我不知道出了什么问题。非常感谢任何帮助。谢谢!

I can't seem to be get Ruby installed on my Mac. These are the steps I've taken so far:

  1. Downloaded the package from Ruby's site (http://www.ruby-lang.org/en/downloads/)
  2. Unpacked it running { tar xzvf ruby-1.9.1-p376.tar.gz }
  3. Went into the new ruby folder, and configured using {./configure}

This is where the error happens. When I run the configure, it gives me the error:

/usr/local/include/fuse/fuse_common.h:32:2: error: #error Please add -D_FILE_OFFSET_BITS=64 to your compile flags!
In file included from /usr/local/include/fuse/fuse.h:857,
                 from <command-line>:0:
/usr/local/include/fuse/fuse_compat.h:69:24: error: sys/statfs.h: No such file or directory

As a result, I can't make the package nor install it. I have no idea what is wrong. Any help is greatly appreciated. Thanks!

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

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

发布评论

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

评论(5

安人多梦 2024-08-26 03:38:59

您是否尝试过RVM?它可以让您管理 ruby​​ 的多个版本,并为您安装它们并管理任何 gem 版本。这真是太神奇了!

安装完成后,您需要做的就是:

`rvm install 1.9`

完成!

Have you tried RVM? It lets you manage multiple versions of ruby and will take of installing them and managing any gem versions for you. It's pretty magic!

After you've installed it all you need to do is:

`rvm install 1.9`

Done!

情栀口红 2024-08-26 03:38:59

如果配置输出的最后一行是,

config.status: creating Makefile

那么您就有了一个 makefile,您可以尝试构建它。

我收到了 fusion.h 错误,然后运行 ​​make 来构建一个可以工作的 ruby​​:

[neilk@maczombie ~]$ ruby --version
ruby 1.9.1p376 (2009-12-07 revision 26041) [i386-darwin10.2.0]

If the last line of configure output is

config.status: creating Makefile

then you have a makefile and you can try building it.

I got the fuse.h error, and just ran make to build a working ruby:

[neilk@maczombie ~]$ ruby --version
ruby 1.9.1p376 (2009-12-07 revision 26041) [i386-darwin10.2.0]
撧情箌佬 2024-08-26 03:38:59

看起来其他人也遇到了此问题

如果您需要二进制文件,可以尝试 rubyosx

我猜测问题是您在 /usr/local 中安装了 FUSE(或 MacFUSE),并且无论出于何种原因,配置阶段正在执行包含它的操作。如果您不想尝试使用某些本地扩展来构建 ruby​​,而是想自己构建 ruby​​,请尝试将 /usr/local 移到一边(至少暂时)。

sudo mv /usr/local /usr/local.aside

(请注意,随意弄乱 /usr 和 /usr/local 目录可能会导致麻烦。)

Looks like others have run into this issue.

If you want need the binary, you could try rubyosx.

I guessing that the issue is that you have FUSE (or MacFUSE) installed in /usr/local and for whatever reason, the configure phase is doing something that's including it. If you're not trying to build ruby with some local extensions, but you want to build ruby yourself, try moving aside /usr/local (at least temporarily).

sudo mv /usr/local /usr/local.aside

(Beware, randomly messing with /usr and /usr/local directories can lead to trouble.)

疯狂的代价 2024-08-26 03:38:59

如果在执行 ./configure 之前设置 C_Flags 或 CPP_Flags 会发生什么?

What happens if you set C_Flags or CPP_Flags before doing your ./configure?

美男兮 2024-08-26 03:38:59

这不是一个答案,而是一个建议的替代方案......使用 macports :-)

This isnt ananswer so much as a suggested alternative... use macports :-)

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