当我试图运行vagrant up
命令时,我陷入困境。我将这个本地.box文件放在我的本地驱动器中,然后拳头运行vagrant init
,然后添加它。添加似乎没问题,但是当我尝试运行vagrant up
时,如下所示,它返回:
C:/HashiCorp/Vagrant/embedded/lib/ruby/2.0.0/uri/common.rb:176:在`split'中:错误的URI(不是URI?):file:C:/用户/ burea1124 / Projects / theirgoods / CUserurea1124Projectstheirgoodstheirgoods_dev_vm.box(URI :: InvalidURIError)
显然看起来我应该在某处修复URI,但我不知道为什么它首先看起来像那样。有没有人知道如何解决这个问题呢?
C:\ Users \ burea1124 \ Projects \ theirgoods> vagrant box add theirgoods C:\ Users \用户burea1124 \项目\ theirgoods \ theirgoods_dev_vm.box ==>框:为提供者添加“他们的好”(v0)框: box:正在下载:file:// C:/Users/burea1124/Projects/theirgoods/theirgoods_dev_vm.box 方框:进度:100%(速率:500M / s,预计剩余时间: - : - : - ) ==>框:已成功为'virtualbox'添加了'他们的好'(v0)框!
C:\用户\ burea1124 \项目\ theirgoods>流浪汉 瞻 机器'默认'与'virtualbox'提供商... ==>默认值:Box'CUserurea1124Projectstheirgoodstheirgoods_dev_vm.box'不可能是 找到。试图找到并安装...... 默认值:Box Provider:virtualbox 默认值:Box版本:> = 0 C:/HashiCorp/Vagrant/embedded/lib/ruby/2.0.0/uri/common.rb:176:in
中split': bad URI(is not URI?): file:C:/Users/burea1124/Projects/theirgoods/CUserurea1124Projectstheirgoodstheirgoods_dev_vm.box (URI::InvalidURIError) from C:/HashiCorp/Vagrant/embedded/lib/ruby/2.0.0/uri/common.rb:211:in
解析” 来自C:/HashiCorp/Vagrant/embedded/lib/ruby/2.0.0/uri/common.rb:747:inparse' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/builtin/box_add.rb:458:in
metadata_url? 来自C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/builtin/box_add.rb:77:inblock in call' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/builtin/box_add.rb:75:in
映射” 来自C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/builtin/box_add.rb:75:in:call' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:34:in
称之为” 来自C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/builder.rb:116:incall' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/runner.rb:66:in
阻止运行' 来自C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/util/busy.rb:19:in:busy' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/runner.rb:66:in
运行” 来自C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/builtin/handle_box.rb:79:inhandle_box' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/builtin/handle_box.rb:42:in
阻止通话' 来自C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/builtin/handle_box.rb:36:in:synchronize' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/builtin/handle_box.rb:36:in
称之为” 来自C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:34:in: 在finalize_action中阻止call' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:95:in
来自C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:34:in:call' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:34:in
称之为” 来自C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/builder.rb:116:incall' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/runner.rb:66:in
阻止运行' 来自C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/util/busy.rb:19:in:busy' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/runner.rb:66:in
运行” 来自C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/builtin/call.rb:53:in:call' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:34:in
称之为” 来自C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/plugins/providers/virtualbox/action/check_virtualbox.rb:17:in:call' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:34:in
称之为” 来自C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/builder.rb:116:incall' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/runner.rb:66:in
阻止运行' 来自C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/util/busy.rb:19:in:busy' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/runner.rb:66:in
运行” 来自C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/machine.rb:196:inaction_raw' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/machine.rb:173:in
阻止行动' 来自C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/environment.rb:434:inlock' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/machine.rb:161:in
称之为” 来自C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/machine.rb:161:in 运行'action' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/batch_action.rb:82:in
阻止(2个级别)
答案 0 :(得分:2)
您的Vagrantfile
似乎在引用带有完整路径的框时,您必须改为使用框名称:
config.vm.box = "theirgoods"
答案 1 :(得分:2)
这是我搜索该错误时的首要问题。在我的情况下的问题是我正确地添加了框,但我复制了现有的Vagrantfile而忘记了vagrant init
。
因此对于有此错误的其他人,请确保您正在执行vagrant init
:)