Vagrant 无法识别 x64-Windows7 上的 VirtualBox(已经运行 JRuby)

发布于 2024-10-12 20:13:55 字数 506 浏览 9 评论 0 原文

我尝试在 64 位 Windows 7 计算机上启动并运行 Vagrant,但不断收到错误消息“Vagrant 无法检测到 VirtualBox!”以下是我安装的内容:

  • JRE 6.0.230.25 x64
  • JRuby 1.6.0.0
  • Ruby 1.8.7.330 (Windows)
  • VirtualBox 3.2.12
  • Vagrant 的当前版本(截至 2011 年 1 月 18 日)

我每次都会遇到相同的错误有一次我尝试这样的命令

vagrant box add eyu package.box

,现在我有点束手无策了。有什么建议吗?

(我在纠结了一段时间之后才安装了 Windows 版本的 Ruby。我不知道将 JRuby 和 Ruby 安装在同一台计算机上是否可能会导致其他冲突,但我一直在在安装之前和之后出现此错误。)

提前感谢您的任何帮助。

I'm trying to get Vagrant up and running on a 64-bit Windows 7 machine, and I'm continually getting an error that "Vagrant could not detect VirtualBox!" Here's what I've got installed:

  • JRE 6.0.230.25 x64
  • JRuby 1.6.0.0
  • Ruby 1.8.7.330 (Windows)
  • VirtualBox 3.2.12
  • Current version of Vagrant (as of 01/18/11)

I've been getting the same error every single time I try a command such as

vagrant box add eyu package.box

and now I'm kind of at my wits' end. Any suggestions?

(And I only installed the Windows version of Ruby after I had been wrestling with this for a while. I don't know if it could potentially causing some other conflict to have JRuby and Ruby installed on the same machine, but I've been getting this error before and after I installed it.)

Thanks in advance for any help.

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

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

发布评论

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

评论(5

温柔嚣张 2024-10-19 20:13:56

您是否已将 Virtualbox 命令放入路径中?

set path=%path%;c:/programfiles/oracle/bin 或类似的?

Have you put the Virtualbox commands in your path?

set path=%path%;c:/programfiles/oracle/bin or similar?

吾家有女初长成 2024-10-19 20:13:56

就我而言,此问题是由 Java Home 变量仍然指向 Java 32 位版本(Program Files(x86))引起的。

另外:当您更改 Java Home 变量时,请重新启动 cmd 才能使其生效;-)(在我弄清楚这一点之前已经让我发疯了)

In my case this problem was caused by the Java Home variable still pointing to the Java 32-bit version (Program Files(x86)).

Also: when you change the Java Home variable, restart your cmd for it to take effect ;-) (drove me nuts before I figured that one out)

终遇你 2024-10-19 20:13:56

遇到同样的问题,最终的解决方案是确保 JRuby 使用 64b JRE 来执行:请参阅 https://groups.google.com/forum/#!topic/vagrant-up/jnksKOR_Qhs

请注意,如果您在环境中设置了 JAVA_HOME,即使您使用包含 JRE 的安装程序安装 JRuby,它也会使用 JAVA_HOME 中的 JRE。您必须手动设置 JAVA_HOME=c:\jruby-xyz\jre。

Had this same problem, in the end the solution was to make sure JRuby was using a 64b JRE to execute: see https://groups.google.com/forum/#!topic/vagrant-up/jnksKOR_Qhs.

Note that if you have JAVA_HOME set in your environment, even if you install JRuby with the installer that includes the JRE, it will use the JRE from your JAVA_HOME. You have to manually set JAVA_HOME=c:\jruby-x.y.z\jre.

烟沫凡尘 2024-10-19 20:13:56

看来 vagrant 正在寻找“VBoxManage”而不是“VBoxManage.exe”。

我更改了文件:

<VAGRANT>/embedded/gems/gems/vagrant-1.4.3/plugins/providers/virtualbox/driver/base.rb

第 26 行:

- @vboxmanage_path = "VBoxManage"
+ @vboxmanage_path = "VBoxManage.exe"

It seems that vagrant is looking for "VBoxManage" instead of "VBoxManage.exe".

I changed the file:

<VAGRANT>/embedded/gems/gems/vagrant-1.4.3/plugins/providers/virtualbox/driver/base.rb

at line 26:

- @vboxmanage_path = "VBoxManage"
+ @vboxmanage_path = "VBoxManage.exe"
归属感 2024-10-19 20:13:56

Kaniabi 类似,我将路径更改为绝对路径:

- @vboxmanage_path = "VBoxManage"
+ @vboxmanage_path = "c:\\Program Files\\Oracle\\VirtualBox\\VBoxManage.exe"

干杯!

Similar with Kaniabi I changed the path to the absolute one:

- @vboxmanage_path = "VBoxManage"
+ @vboxmanage_path = "c:\\Program Files\\Oracle\\VirtualBox\\VBoxManage.exe"

Cheers!

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