jruby 和 jgem 都抛出“Trace/BPT 陷阱”;在 Mac OS X 10.6 上

发布于 2024-10-01 10:05:21 字数 623 浏览 1 评论 0原文

我最近使用 macports 在 Mac OS X 10.6.4 上安装了 jgem 和 jruby。现在,当我尝试运行它们时,它们都会生成臭名昭著的“Trace/BPT trap”错误。

例如,从命令行:

<前><代码>$ jgem --版本 跟踪/BPT 陷阱 $ jruby --版本 jruby 1.5.2 (ruby 1.8.7 patchlevel 249) (2010-11-03 6586) (Java HotSpot(TM) 客户端 VM 1.6.0_03-p3) [i386-java] 跟踪/BPT 陷阱

这不是我在这台机器上安装的这些程序的第一个版本,所以我很好奇是否可能是某些旧版本的 java 或 ruby​​ 造成的。我对 jgem 或 jruby 内部结构不够熟悉,不知道这是否是一个合理的猜测。

这是我的 ruby​​ 和 java 版本:

$ java -version
java version "1.6.0_03-p3"
$ ruby --version
ruby 1.8.7 (2010-08-16 patchlevel 302) [i686-darwin10]

非常感谢任何见解。提前致谢。

I recently installed jgem and jruby on Mac OS X 10.6.4 with macports. Now both of them generate the notorious 'Trace/BPT trap' error when I try to run them.

For example, from the command line:

$ jgem --version
Trace/BPT trap
$ jruby --version
jruby 1.5.2 (ruby 1.8.7 patchlevel 249) (2010-11-03 6586) (Java HotSpot(TM) Client VM  1.6.0_03-p3) [i386-java]
Trace/BPT trap

This is not the first version of either of these programs I have installed on this machine, so I am curious if perhaps some old version of either java or ruby is to blame. I'm not familiar enough with jgem or jruby internals to know if that is even a reasonable guess.

Here are my ruby and java versions:

$ java -version
java version "1.6.0_03-p3"
$ ruby --version
ruby 1.8.7 (2010-08-16 patchlevel 302) [i686-darwin10]

Any insight is much appreciated. Thanks in advance.

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

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

发布评论

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

评论(1

妄断弥空 2024-10-08 10:05:21

刚刚弄清楚我的问题!

java的版本是罪魁祸首。它已经过时了,而且也适用于我最近升级的 Mac OS X 10.5。为了解决这个问题,我做了以下操作:

  1. 下载并安装适用于 Mac OS X 10.6 这里
  2. 新安装的 java bin 文件夹位于 /System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/bin。将其添加到您的配置文件中 $PATH 的前面。
  3. 重新启动终端或获取配置文件。
  4. 在终端中输入which java。输出应该是上面的 java 安装路径,最后带有 /java
  5. 输入jruby --version。如果 jruby 现在可以工作,它应该输出类似 jruby 1.5.2 (ruby 1.8.7 patchlevel 249) (2010-11-09 6586) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_22) 的内容[x86_64-java]
  6. 现在您已经完成了。解决简单问题万岁!

Just figured out my problem!

The version of java was to blame. It was out-of-date and also for Mac OS X 10.5, from which I have recently upgraded. To solve this problem, here's what I did:

  1. Download and install the most recent version of the jdk for Mac OS X 10.6 here.
  2. The newly installed java bin folder is at /System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/bin. Add this to the front of your $PATH in your profile file.
  3. Restart terminal or source the profile file.
  4. Type which java in terminal. The output should be the java installation path above with a /java at the very end.
  5. Type jruby --version. If jruby is now working, it should output something pleasant like jruby 1.5.2 (ruby 1.8.7 patchlevel 249) (2010-11-09 6586) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_22) [x86_64-java]
  6. Now you're done. Hurray for simple problems!
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文