我正在为我的环境使用Vagrant,我有一个小问题:
$vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'base' could not be found. Attempting to find and install...
default: Box Provider: virtualbox
default: Box Version: >= 0
==> default: Adding box 'base' (v0) for provider: virtualbox
default: Downloading: base
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/.../base
Run Code Online (Sandbox Code Playgroud)
我初始化了我的项目vagrant init但由于某种原因vagrant up拒绝工作.
Bri*_*anC 254
看起来您可能已经创建了一个Vagrant项目vagrant init.这将创建您的Vagrantfile,但它不会定义一个框.
相反,你可以试试
$ vagrant init hashicorp/precise32
$ vagrant up
它使用标准的Ubuntu映像.Vagrant网站有一个入门,提供了一些很好的例子.
小智 101
如果你正在使用OS X并使用标准安装,删除vagrant的旧卷曲,它现在应该可以工作
sudo rm /opt/vagrant/embedded/bin/curl
Bar*_*ime 83
vagrant init laravel/homestead
Run Code Online (Sandbox Code Playgroud)
然后
vagrant up
Run Code Online (Sandbox Code Playgroud)
什么对我有用.
小智 43
这是因为有一个没有定义框名称的vagrant文件.当你使用box name参数运行vagrant init时会发生这种情况 .
所以你必须删除Vagrant文件
vagrant init box-title
vagrant up
Run Code Online (Sandbox Code Playgroud)
你可以在这里找到所有的盒子
我希望这可以帮助你!
小智 21
对我来说,这些是以下步骤:
cd homestead (在您的目录homestead文件夹中)或 cd Homesteaddel vagrantfile 要么 rm -Rf Vagrantfilevagrant init laravel/homesteadvagrant up小智 15
请在您的终端中运行:
$ vagrant box list
Run Code Online (Sandbox Code Playgroud)
你会看到类似的东西 laravel/homestead(virtualbox,x.x.x)
接下来找到你的Vagrantfile并找到所说的那一行
config.vm.box = "box"
Run Code Online (Sandbox Code Playgroud)
box在运行时替换为框名称vagrant box list.
小智 15
我知道这是旧的,但我得到了完全相同的错误.事实证明我错过了文档中明确的这一步骤.
我需要编辑它Vagrantfile以设置config.vm.box等于我下载的图像,hashicorp/precise32.默认情况下,它设置为base.
这是文档说的内容:
现在该框已添加到Vagrant,我们需要配置我们的项目以将其用作基础.打开Vagrantfile并将内容更改为以下内容:
Run Code Online (Sandbox Code Playgroud)Vagrant.configure("2") do |config| config.vm.box = "hashicorp/precise32" end
小智 12
如果"Vagrantfile" already exists in this directory. Remove it before running "vagrant init".
错误显示
1. rm Vagrantfile
2. vagrant init hashicorp/precise64
3. vagrant up
Run Code Online (Sandbox Code Playgroud)
在Vagrant中嵌入式卷曲程序似乎有问题.按照上面的建议,我只是将其重命名(以防万一我想要它)并vagrant up开始按预期工作.
在我的Mac上:
? .vagrant.d sudo mv /opt/vagrant/embedded/bin/curl /opt/vagrant/embedded/bin/curlOLD
Password:
小智 6
我也遇到过这个错误.我想是因为我没有提供box_url ..
vagrant init precise64 http://files.vagrantup.com/precise64.box
Run Code Online (Sandbox Code Playgroud)
对我来说,运行时出现错误vagrant up(我使用的是 Macbook pro,Mac OS:10.12.1):
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...
我试图删除Vagrantfile我的文件夹中的并运行:
vagrant init hashicorp/precise64
然后:
vagrant up
它可以解决我的问题。希望这可以帮助面临同样问题的人。
当我运行以下命令时,我遇到了同样的问题
vagrant init
vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'base' could not be found. Attempting to find and install...
default: Box Provider: virtualbox
default: Box Version: >= 0
==> default: Box file was not detected as metadata. Adding it directly...
==> default: Adding box 'base' (v0) for provider: virtualbox
default: Downloading: base
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 /home/...../base
Run Code Online (Sandbox Code Playgroud)
我纠正了
>vagrant init laravel/homestead
>Vagrant up
Run Code Online (Sandbox Code Playgroud)
它对我有用。
快乐编码
在启动 Vagrant 之前,第一步也是最重要的一步是,检查系统中存在哪些所有框。使用此命令获取可用框列表。
vagrant box list
然后进入进一步的过程,即选择一个特定的框
vagrant init ubuntu/trusty64 (我选择了 ubuntu/trusty64)
然后,
vagrant up
谢谢
| 归档时间: |
|
| 查看次数: |
189564 次 |
| 最近记录: |