【问题标题】:Vagrant unable to provision from a machine despite copy/pasting the path尽管复制/粘贴了路径,但 Vagrant 无法从机器上进行配置
【发布时间】:2017-03-18 22:39:20
【问题描述】:

我在使用 Virtual box 启动 Vagrant 时遇到问题。我在命令行输入一个空白项目文件夹的代码是:

vagrant init tsawler/wafs; vagrant up --provider virtualbox

作为回应,我收到以下消息:


C:\Users\Owner\PhpstormProjects\modernphptut>vagrant init tsawler/wafs; vagrant up --provider virtualbox 指定了无效选项。该命令的帮助 可在下面找到。 用法:vagrant init [options] [name [url]]

选项:

    --box-version VERSION        Version of the box to add
-f, --force                      Overwrite existing Vagrantfile
-m, --minimal                    Create minimal Vagrantfile (no help comments)
    --output FILE                Output path for the box. '-' for stdout
-h, --help                       Print this help

我正在复制与此页面上显示的完全相同的命令行文本:https://atlas.hashicorp.com/tsawler/boxes/wafs

这是我第一次尝试使用 Vagrant/虚拟机。有谁知道为什么它不起作用?我今天刚刚在我的 Windows 10 机器上安装了 Vagrant 和 Virtualbox,所以我有最新版本。

【问题讨论】:

    标签: vagrant virtual-machine virtualbox vagrant-provision


    【解决方案1】:

    这是一个多行命令,而这个

    vagrant init tsawler/wafs; vagrant up --provider virtualbox
    

    在 linux 或 mac os 中运行良好,但不适用于 windows。

    对于windows,你应该运行为

    vagrant init tsawler/wafs & vagrant up --provider virtualbox
    

    或者你也可以一个一个的运行命令

    C:\Users\Owner\PhpstormProjects\modernphptut>vagrant init tsawler/wafs
    .....
    C:\Users\Owner\PhpstormProjects\modernphptut>vagrant up --provider virtualbox
    

    【讨论】:

      猜你喜欢
      • 2021-10-28
      • 2011-09-04
      • 1970-01-01
      • 2013-10-11
      • 1970-01-01
      • 1970-01-01
      • 2011-08-19
      • 2016-01-31
      相关资源
      最近更新 更多