安装Homestead Vagrant Box时出现问题

时间:2015-12-07 10:09:28

标签: laravel laravel-5 homestead

我正在使用ubuntu 14.04,而我正试图设置larave / Homestead。但是在安装Homestead Vagrant Box的过程中,我在中间失去了互联网连接,之后我尝试使用' $ vagrant box add laravel/homestead'重新安装它。 命令行,但在重新安装时会提示以下错误。

1) virtualbox
2) vmware_desktop

Enter your choice: 1
==> box: Adding box 'laravel/homestead' (v0.3.3) for provider: virtualbox
    box: Downloading: https://atlas.hashicorp.com/laravel/boxes/homestead/versions/0.3.3/providers/virtualbox.box
==> box: Box download is resuming from prior download progress
An error occurred while downloading the remote file. The error
message, if any, is reproduced below. Please fix this error and try
again.

HTTP server doesn't seem to support byte ranges. Cannot resume.

我尝试重新安装流浪汉,但这没有用。

3 个答案:

答案 0 :(得分:1)

您需要清除Vagrant生成的临时文件。

这可以通过三种方式实现:

  1. 强制清除安装

    添加参数--clean,因此$ vagrant box add laravel/homestead --clean

  2. 手动删除

    通过点击cmd+space并输入~/.vagrant.d/tmp/手动导航到vagrants临时文件夹,然后删除位于此处的文件。

  3. <强>终端

    打开终端并删除生成的临时文件 流浪:

    rm ~/.vagrant.d/tmp/*
    

答案 1 :(得分:0)

感谢@Nicklas的快速回复。但我解决了它在结尾添加'-c'标志。

$ vagrant box add laravel/homestead -c

这删除了与.vagrant.d / tmp /

中分配的文件相关联的文件

答案 2 :(得分:0)

最简单的选择是强制安装程序清理旧文件,因此您只需要使用此命令

#config/application.rb
...
config.paperclip_defaults = {
   styles: { large: "750x750^", medium: "600x600>", thumb: "100x100>" },     
   default_url: ":style/missing.gif"
} 

source