新手问题 [已解决] vagrant box 下载的好慢,求解决办法

bastengao · 2013年07月13日 · 最后由 YanhaoMo 回复于 2017年12月05日 · 43155 次阅读

我这里的网速 8M 电信,可是 vagrant box add lucid32 http://files.vagrantup.com/lucid32.box 下载了一个小时,才下了 10 MB。不知道大家遇没遇这个问题。

http://files.vagrantup.com 上下载并不慢的,可能是国内连比较慢。可以直接下 http://files.vagrantup.com/lucid32.box 试试速度。

迅雷离线

#3 楼 @search 刚才是用迅雷离线试的。

能用迅雷离线当然用迅雷下到本地啊。然后 vagrant box add ludic32 /path/to/local/lucid32.box 就好了

去运动一下,再洗个澡,再去看看书,回来发现没有下载完成的话,用 vps 下载然后拖到本地。

#2 楼 @bastengao 400K 不算太慢了,用 #5 楼 @doitian 的方法先下到本地再用吧。

#5 楼 @doitian 此方法好用

谢谢大家

#10 楼 @mogodb 前几天也碰到这个问题,就写了一个油猴脚本,为 atlas.hashicorp.com 上的 vagrant box 增加下载链接,方便下载,你可以试试 https://github.com/everyx/vagrant-box-download-helper-everyx.user.js

我也遇到这个问题了,蛋疼的是还不支持断点续传。

啊,4 年过去了,仍旧是慢。

ps 在命令行的显示里也可以复制链接

vagrant init hashicorp/precise64

对应的是:

vagrant box add hashicorp/precise64 C:\Users\hasee\Downloads\precise64.box

楼上(我自己)的回答会导致安装的版本是 v0.0 的。在 laravel 的学习中,这是不行的。

所以必须能指定版本,所以在本地搭建一个静态文件的服务器。 目录结构如下:

.
└── laravel
    ├── boxes
    │   └── homestead
    │       └── versions
    │           └── 4.0.0
    │               └── providers
    │                   └── virtualbox.box
    └── homestead.json

json 文件内容如下(就是将其中的 box 文件地址替换为本地的):

{"description":"The official Laravel local development environment.","short_description":"Official Laravel local development box.","name":"laravel/homestead","versions":[{"version":"4.0.0","status":"active","description_html":"<p><a href=\"https://github.com/laravel/settler/releases/tag/v4.0.0\">https://github.com/laravel/settler/releases/tag/v4.0.0</a></p>\n","description_markdown":"https://github.com/laravel/settler/releases/tag/v4.0.0","providers":[{"name":"parallels","url":"https://vagrantcloud.com/laravel/boxes/homestead/versions/4.0.0/providers/parallels.box"},
  {"name":"virtualbox","url":"http://127.0.0.1:7070/laravel/boxes/homestead/versions/4.0.0/providers/virtualbox.box"},{"name":"vmware_desktop","url":"https://vagrantcloud.com/laravel/boxes/homestead/versions/4.0.0/providers/vmware_desktop.box"}]},{"version":"3.1.0","status":"active","description_html":"<p><a href=\"https://github.com/laravel/settler/releases/tag/v3.1.0\">https://github.com/laravel/settler/releases/tag/v3.1.0</a></p>\n","description_markdown":"https://github.com/laravel/settler/releases/tag/v3.1.0","providers":[{"name":"vmware_desktop","url":"https://vagrantcloud.com/laravel/boxes/homestead/versions/3.1.0/providers/vmware_desktop.box"},{"name":"parallels","url":"https://vagrantcloud.com/laravel/boxes/homestead/versions/3.1.0/providers/parallels.box"},{"name":"virtualbox","url":"https://vagrantcloud.com/laravel/boxes/homestead/versions/3.1.0/providers/virtualbox.box"}]},{"version":"3.0.0","status":"active","description_html":"<p><a href=\"https://github.com/laravel/settler/releases/tag/v3.0.0\">https://github.com/laravel/settler/releases/tag/v3.0.0</a></p>\n","description_markdown":"https://github.com/laravel/settler/releases/tag/v3.0.0","providers":[{"name":"vmware_desktop","url":"https://vagrantcloud.com/laravel/boxes/homestead/versions/3.0.0/providers/vmware_desktop.box"},{"name":"parallels","url":"https://vagrantcloud.com/laravel/boxes/homestead/versions/3.0.0/providers/parallels.box"},{"name":"virtualbox","url":"https://vagrantcloud.com/laravel/boxes/homestead/versions/3.0.0/providers/virtualbox.box"}]},{"version":"2.2.0","status":"active","description_html":"<p><a href=\"https://github.com/laravel/settler/releases/tag/v2.2.0\">https://github.com/laravel/settler/releases/tag/v2.2.0</a></p>\n","description_markdown":"https://github.com/laravel/settler/releases/tag/v2.2.0","providers":[{"name":"parallels","url":"https://vagrantcloud.com/laravel/boxes/homestead/versions/2.2.0/providers/parallels.box"},{"name":"vmware_desktop","url":"https://vagrantcloud.com/laravel/boxes/homestead/versions/2.2.0/providers/vmware_desktop.box"},{"name":"virtualbox","url":"https://vagrantcloud.com/laravel/boxes/homestead/versions/2.2.0/providers/virtualbox.box"}]},{"version":"2.1.0","status":"active","description_html":"<p><a href=\"https://github.com/laravel/settler/releases/tag/v2.1.0\">https://github.com/laravel/settler/releases/tag/v2.1.0</a></p>\n","description_markdown":"https://github.com/laravel/settler/releases/tag/v2.1.0","providers":[{"name":"vmware_desktop","url":"https://vagrantcloud.com/laravel/boxes/homestead/versions/2.1.0/providers/vmware_desktop.box"},{"name":"parallels","url":"https://vagrantcloud.com/laravel/boxes/homestead/versions/2.1.0/providers/parallels.box"},{"name":"virtualbox","url":"https://vagrantcloud.com/laravel/boxes/homestead/versions/2.1.0/providers/virtualbox.box"}]},{"version":"2.0.0","status":"active","description_html":"<p><a href=\"https://github.com/laravel/settler/releases/tag/v2.0.0\">https://github.com/laravel/settler/releases/tag/v2.0.0</a></p>\n","description_markdown":"https://github.com/laravel/settler/releases/tag/v2.0.0","providers":[{"name":"parallels","url":"https://vagrantcloud.com/laravel/boxes/homestead/versions/2.0.0/providers/parallels.box"},{"name":"vmware_desktop","url":"https://vagrantcloud.com/laravel/boxes/homestead/versions/2.0.0/providers/vmware_desktop.box"},{"name":"virtualbox","url":"https://vagrantcloud.com/laravel/boxes/homestead/versions/2.0.0/providers/virtualbox.box"}]},{"version":"1.1.0","status":"active","description_html":"<p><a href=\"https://github.com/laravel/settler/releases/tag/v1.1.0\">https://github.com/laravel/settler/releases/tag/v1.1.0</a></p>\n","description_markdown":"https://github.com/laravel/settler/releases/tag/v1.1.0","providers":[{"name":"vmware_desktop","url":"https://vagrantcloud.com/laravel/boxes/homestead/versions/1.1.0/providers/vmware_desktop.box"},{"name":"parallels","url":"https://vagrantcloud.com/laravel/boxes/homestead/versions/1.1.0/providers/parallels.box"},{"name":"virtualbox","url":"https://vagrantcloud.com/laravel/boxes/homestead/versions/1.1.0/providers/virtualbox.box"}]},{"version":"1.0.1","status":"active","description_html":"<ul>\n<li>Adds Missing XDebug</li>\n</ul>\n","description_markdown":"* Adds Missing XDebug","providers":[{"name":"parallels","url":"https://vagrantcloud.com/laravel/boxes/homestead/versions/1.0.1/providers/parallels.box"},{"name":"vmware_desktop","url":"https://vagrantcloud.com/laravel/boxes/homestead/versions/1.0.1/providers/vmware_desktop.box"},{"name":"virtualbox","url":"https://vagrantcloud.com/laravel/boxes/homestead/versions/1.0.1/providers/virtualbox.box"}]},{"version":"1.0.0","status":"active","description_html":"<ul>\n<li>Ubuntu 16.04</li>\n<li>PHP 7.1</li>\n<li>Homestead 3.2 Required</li>\n</ul>\n","description_markdown":"* Ubuntu 16.04\r\n* PHP 7.1\r\n* Homestead 3.2 Required","providers":[{"name":"virtualbox","url":"https://vagrantcloud.com/laravel/boxes/homestead/versions/1.0.0/providers/virtualbox.box"},{"name":"vmware_desktop","url":"https://vagrantcloud.com/laravel/boxes/homestead/versions/1.0.0/providers/vmware_desktop.box"}]},{"version":"0.6.1","status":"active","description_html":"<ul>\n<li>Testing out VMWare Tools Manual Install</li>\n</ul>\n","description_markdown":"* Testing out VMWare Tools Manual Install","providers":[{"name":"vmware_desktop","url":"https://vagrantcloud.com/laravel/boxes/homestead/versions/0.6.1/providers/vmware_desktop.box"}]},{"version":"0.6.0","status":"active","description_html":"<ul>\n<li>Add Yarn via NPM</li>\n</ul>\n","description_markdown":"- Add Yarn via NPM","providers":[{"name":"vmware_desktop","url":"https://vagrantcloud.com/laravel/boxes/homestead/versions/0.6.0/providers/vmware_desktop.box"},{"name":"virtualbox","url":"https://vagrantcloud.com/laravel/boxes/homestead/versions/0.6.0/providers/virtualbox.box"}]},{"version":"0.5.0","status":"active","description_html":"<ul>\n<li>Upgrade to Ubuntu 16.04.</li>\n</ul>\n","description_markdown":"- Upgrade to Ubuntu 16.04.","providers":[{"name":"virtualbox","url":"https://vagrantcloud.com/laravel/boxes/homestead/versions/0.5.0/providers/virtualbox.box"}]},{"version":"0.4.4","status":"active","description_html":"<ul>\n<li>Update dependencies.</li>\n<li>Added PHP Soap extension.</li>\n</ul>\n","description_markdown":"- Update dependencies.\r\n- Added PHP Soap extension.","providers":[{"name":"vmware_desktop","url":"https://vagrantcloud.com/laravel/boxes/homestead/versions/0.4.4/providers/vmware_desktop.box"},{"name":"virtualbox","url":"https://vagrantcloud.com/laravel/boxes/homestead/versions/0.4.4/providers/virtualbox.box"}]},{"version":"0.4.2","status":"active","description_html":"<ul>\n<li>Updated PHP and related PPAs.</li>\n</ul>\n","description_markdown":"- Updated PHP and related PPAs.","providers":[{"name":"vmware_desktop","url":"https://vagrantcloud.com/laravel/boxes/homestead/versions/0.4.2/providers/vmware_desktop.box"},{"name":"virtualbox","url":"https://vagrantcloud.com/laravel/boxes/homestead/versions/0.4.2/providers/virtualbox.box"}]},{"version":"0.4.1","status":"active","description_html":"<ul>\n<li>Updated PHP.</li>\n<li>Added Xdebug.</li>\n</ul>\n","description_markdown":"- Updated PHP.\r\n- Added Xdebug.","providers":[{"name":"vmware_desktop","url":"https://vagrantcloud.com/laravel/boxes/homestead/versions/0.4.1/providers/vmware_desktop.box"},{"name":"virtualbox","url":"https://vagrantcloud.com/laravel/boxes/homestead/versions/0.4.1/providers/virtualbox.box"}]},{"version":"0.4.0","status":"active","description_html":"<ul>\n<li>Update to PHP 7.</li>\n</ul>\n","description_markdown":"- Update to PHP 7.","providers":[{"name":"vmware_desktop","url":"https://vagrantcloud.com/laravel/boxes/homestead/versions/0.4.0/providers/vmware_desktop.box"},{"name":"virtualbox","url":"https://vagrantcloud.com/laravel/boxes/homestead/versions/0.4.0/providers/virtualbox.box"}]},{"version":"0.3.3","status":"active","description_html":"<ul>\n<li>Upgrade MySQL to 5.7</li>\n<li>Upgrade Node to 5.0</li>\n</ul>\n","description_markdown":"- Upgrade MySQL to 5.7\r\n- Upgrade Node to 5.0","providers":[{"name":"vmware_desktop","url":"https://vagrantcloud.com/laravel/boxes/homestead/versions/0.3.3/providers/vmware_desktop.box"},{"name":"virtualbox","url":"https://vagrantcloud.com/laravel/boxes/homestead/versions/0.3.3/providers/virtualbox.box"}]},{"version":"0.3.0","status":"active","description_html":"<ul>\n<li>Various updates and fixes.</li>\n</ul>\n","description_markdown":"- Various updates and fixes.","providers":[{"name":"virtualbox","url":"https://vagrantcloud.com/laravel/boxes/homestead/versions/0.3.0/providers/virtualbox.box"}]},{"version":"0.2.7","status":"active","description_html":"<ul>\n<li>Use Ubuntu 14.04 LTS.</li>\n</ul>\n","description_markdown":"- Use Ubuntu 14.04 LTS.","providers":[{"name":"vmware_desktop","url":"https://vagrantcloud.com/laravel/boxes/homestead/versions/0.2.7/providers/vmware_desktop.box"},{"name":"virtualbox","url":"https://vagrantcloud.com/laravel/boxes/homestead/versions/0.2.7/providers/virtualbox.box"}]},{"version":"0.2.6","status":"active","description_html":"<ul>\n<li>Updated Node.</li>\n<li>Updated Dependencies.</li>\n</ul>\n","description_markdown":"- Updated Node.\r\n- Updated Dependencies.","providers":[{"name":"vmware_desktop","url":"https://vagrantcloud.com/laravel/boxes/homestead/versions/0.2.6/providers/vmware_desktop.box"},{"name":"virtualbox","url":"https://vagrantcloud.com/laravel/boxes/homestead/versions/0.2.6/providers/virtualbox.box"}]},{"version":"0.2.5","status":"active","description_html":"<ul>\n<li>Fixed HHVM and Blackfire.</li>\n</ul>\n","description_markdown":"- Fixed HHVM and Blackfire.","providers":[{"name":"vmware_desktop","url":"https://vagrantcloud.com/laravel/boxes/homestead/versions/0.2.5/providers/vmware_desktop.box"},{"name":"virtualbox","url":"https://vagrantcloud.com/laravel/boxes/homestead/versions/0.2.5/providers/virtualbox.box"}]},{"version":"0.2.4","status":"active","description_html":"<ul>\n<li>Update dependencies.</li>\n<li>Provide VMWare support.</li>\n</ul>\n","description_markdown":"- Update dependencies.\r\n- Provide VMWare support.","providers":[{"name":"vmware_desktop","url":"https://vagrantcloud.com/laravel/boxes/homestead/versions/0.2.4/providers/vmware_desktop.box"},{"name":"virtualbox","url":"https://vagrantcloud.com/laravel/boxes/homestead/versions/0.2.4/providers/virtualbox.box"}]},{"version":"0.2.2","status":"active","description_html":"<ul>\n<li>Updated Postgres to 9.4</li>\n<li>Installed Blackfire</li>\n</ul>\n","description_markdown":"- Updated Postgres to 9.4\r\n- Installed Blackfire","providers":[{"name":"virtualbox","url":"https://vagrantcloud.com/laravel/boxes/homestead/versions/0.2.2/providers/virtualbox.box"}]},{"version":"0.2.1","status":"active","description_html":"<ul>\n<li>Update Packages.</li>\n<li>Use MySQL 5.6.</li>\n</ul>\n","description_markdown":"- Update Packages.\r\n- Use MySQL 5.6.","providers":[{"name":"virtualbox","url":"https://vagrantcloud.com/laravel/boxes/homestead/versions/0.2.1/providers/virtualbox.box"}]},{"version":"0.2.0","status":"active","description_html":"<ul>\n<li>Updated HHVM to 3.3.0 (LTS).</li>\n<li>Package Update.</li>\n</ul>\n","description_markdown":"- Updated HHVM to 3.3.0 (LTS).\r\n- Package Update.","providers":[{"name":"virtualbox","url":"https://vagrantcloud.com/laravel/boxes/homestead/versions/0.2.0/providers/virtualbox.box"}]},{"version":"0.1.9","status":"active","description_html":"<ul>\n<li>Enable XDebug Remote Debug By Default</li>\n<li>Include HHVM By Default</li>\n</ul>\n","description_markdown":"- Enable XDebug Remote Debug By Default\r\n- Include HHVM By Default","providers":[{"name":"virtualbox","url":"https://vagrantcloud.com/laravel/boxes/homestead/versions/0.1.9/providers/virtualbox.box"}]},{"version":"0.1.8","status":"active","description_html":"<p>Update PHP to 5.6.</p>\n","description_markdown":"Update PHP to 5.6.","providers":[{"name":"virtualbox","url":"https://vagrantcloud.com/laravel/boxes/homestead/versions/0.1.8/providers/virtualbox.box"}]},{"version":"0.1.7","status":"active","description_html":"<p>Changed to php5-mysqlnd.</p>\n\n<p>Update packages.</p>\n","description_markdown":"Changed to php5-mysqlnd.\r\n\r\nUpdate packages.","providers":[{"name":"virtualbox","url":"https://vagrantcloud.com/laravel/boxes/homestead/versions/0.1.7/providers/virtualbox.box"}]},{"version":"0.1.6","status":"active","description_html":"<p>Fix some MySQL permission errors.</p>\n","description_markdown":"Fix some MySQL permission errors.","providers":[{"name":"virtualbox","url":"https://vagrantcloud.com/laravel/boxes/homestead/versions/0.1.6/providers/virtualbox.box"}]},{"version":"0.1.5","status":"active","description_html":"<p>Updated database user.</p>\n","description_markdown":"Updated database user.","providers":[{"name":"virtualbox","url":"https://vagrantcloud.com/laravel/boxes/homestead/versions/0.1.5/providers/virtualbox.box"}]},{"version":"0.1.4","status":"active","description_html":"<p>Added Envoy installation.</p>\n","description_markdown":"Added Envoy installation.","providers":[{"name":"virtualbox","url":"https://vagrantcloud.com/laravel/boxes/homestead/versions/0.1.4/providers/virtualbox.box"}]},{"version":"0.1.3","status":"active","description_html":"<p>Created databases by default.</p>\n","description_markdown":"Created databases by default.","providers":[{"name":"virtualbox","url":"https://vagrantcloud.com/laravel/boxes/homestead/versions/0.1.3/providers/virtualbox.box"}]},{"version":"0.1.2","status":"active","description_html":"<p>Update dependencies.</p>\n","description_markdown":"Update dependencies.","providers":[{"name":"virtualbox","url":"https://vagrantcloud.com/laravel/boxes/homestead/versions/0.1.2/providers/virtualbox.box"}]},{"version":"0.1.1","status":"active","description_html":"<p>Updated dependencies.</p>\n","description_markdown":"Updated dependencies.","providers":[{"name":"virtualbox","url":"https://vagrantcloud.com/laravel/boxes/homestead/versions/0.1.1/providers/virtualbox.box"}]},{"version":"0.1.0","status":"active","description_html":null,"description_markdown":"","providers":[{"name":"virtualbox","url":"https://vagrantcloud.com/laravel/boxes/homestead/versions/0.1.0/providers/virtualbox.box"}]}]}

执行命令

vagrant box add laravel/homestead  http://127.0.0.1:7070/laravel/homestead.json

并选择第 2 个(virtual box)

还是慢啊,如果能有国内镜像就好了

需要 登录 后方可回复, 如果你还没有账号请 注册新账号