我尝试在 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.
发布评论
评论(5)
您是否已将 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?就我而言,此问题是由 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)
遇到同样的问题,最终的解决方案是确保 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.
看来 vagrant 正在寻找“VBoxManage”而不是“VBoxManage.exe”。
我更改了文件:
第 26 行:
It seems that vagrant is looking for "VBoxManage" instead of "VBoxManage.exe".
I changed the file:
at line 26:
与 Kaniabi 类似,我将路径更改为绝对路径:
干杯!
Similar with Kaniabi I changed the path to the absolute one:
Cheers!