2014-04-20 36 views
5

我是用本地文件從https://dl.dropboxusercontent.com/s/x1085661891dhkz/lxc-centos6.5-2013-12-02.box遊民無法找到現有的箱

流浪漢框中添加盒加入CentOS的centos.box

流浪漢初始化的CentOS

我的外殼:

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 
+1

使用'vagrant box add/path/to/lxc-centos6.5-2013-12-02.box'添加該框,如果您已經下載了它。 –

回答

7

使用具有文件協議URI的完整路徑添加本地Box文件。例如:

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

(當然確切位置取決於你在哪裏已經把文件)

0

我已經解決了類似的問題,提升流浪到最新版本,並奇蹟般地它的工作原理... :/

1
$ vagrant box add CentOSMinimal https://dl.dropbox.com/u/7225008/Vagrant/CentOS-6.3-x86_64-minimal.box 
$ vagrant init CentOSMinimal 
$ vagrant up 
1

如果您使用的是Windows,你可以定義路徑:

vagrant box add box_name "C:\Users\JohnDoe\blahblah\box_name.box" 

通知.box在路徑的末尾。

然後你可以cd進入目錄,如果你不在那裏,並做vagrant up