Vagrant 流浪汉可以';找不到现有的盒子

Vagrant 流浪汉可以';找不到现有的盒子,vagrant,Vagrant,我是添加框与本地文件从 流浪者箱添加centos centos.box 阴道炎 我的外壳: cheneytekimbp:vagrant-centos zicjin$ vagrant box list centos (lxc, 0) lucid32 (virtualbox, 0) cheneytekimbp:vagrant-centos zicjin$ vagrant up Bringing machine 'default' up with 'virtualbox' provider... =

我是添加框与本地文件从

流浪者箱添加centos centos.box

阴道炎

我的外壳:

cheneytekimbp:vagrant-centos zicjin$ vagrant box list
centos  (lxc, 0)
lucid32 (virtualbox, 0)
cheneytekimbp:vagrant-centos zicjin$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'centos' could not be found. Attempting to find and install...
    default: Box Provider: virtualbox
    default: Box Version: >= 0
==> default: Adding box 'centos' (v0) for provider: virtualbox
    default: Downloading: centos
An error occurred while downloading the remote file. The error
message, if any, is reproduced below. Please fix this error and try
again.

Couldn't open file /Users/zicjin/Work/vagrant-centos/centos

使用文件协议URI的完整路径添加本地box文件。例如:

vagrant box add centos file:///Users/zicjin/Work/vagrant-centos/centos.box

(确切的位置当然取决于你把文件放在哪里)

我已经解决了一个类似的问题,将Vagrant升级到最新版本,它神奇地工作了…:/

如果您在windows上,可以将路径定义为:

$ vagrant box add CentOSMinimal  https://dl.dropbox.com/u/7225008/Vagrant/CentOS-6.3-x86_64-minimal.box
 $ vagrant init CentOSMinimal
 $ vagrant up
vagrant box add box_name "C:\Users\JohnDoe\blahblah\box_name.box"
请注意路径末尾的
.box


然后,如果您还不在目录中,您可以
cd
,使用
vagrant-box-add/path/to/lxc-centos6.5-2013-12-02.box
添加已下载的框。