Vagrant 正在 windows 上搜索 rsync

Vagrant is searching form rsync on windows

这是 Vagrant 文件:

# -*- mode: ruby -*-
# vi: set ft=ruby :

VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
    config.vm.define :sylius do |sylius_config|
        sylius_config.vm.box = "debian/jessie64"

        sylius_config.vm.provider "virtualbox" do |v|
            v.gui = false
            v.memory = 1024
            v.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/v-root", "1"]
        end

        sylius_config.vm.synced_folder "sites/", "/var/www/sites", type: "smb" ,mount_options: ['rw', 'vers=3', 'tcp', 'fsc', 'nolock', 'actimeo=2']
        sylius_config.vm.network "private_network", ip: "10.0.0.200"

        # Shell provisioning
        sylius_config.vm.provision :shell, :path => "shell_provisioner/run.sh"
        sylius_config.vm.provision :shell, privileged: false, path: "shell_provisioner/module/sylius.sh"
    end
end

当我输入 vagrant up 时,我得到了这个:

==> sylius: Checking if box 'debian/jessie64' is up to date...
"rsync" could not be found on your PATH. Make sure that rsync
is properly installed on your system and available on the PATH

共享类型是"smb",我可以看出 vagrant 搜索 rsync 的任何原因。有任何想法吗?如果重要的话,我正在使用 virtualbox 作为提供者。我尝试删除类型参数,但没有用。我复制Vagrantfile时,共享类型是"nsf",需要rsync.

此框具有 rsync 类型的默认同步文件夹。

如果您查找盒子的 Vagrantfile(在 mac 上它在 ~/.vagrant.d/boxes/debian-VAGRANTSLASH-jessie64//virtualbox/Vagrantfile 下)

Vagrant.configure("2") do |config|
  config.vm.base_mac = "0800278dc04d"
  config.vm.synced_folder ".", "/vagrant", type: "rsync"
  config.vm.post_up_message = "Vanilla Debian box. See https://atlas.hashicorp.com/debian/ for help and bug reports"
   #TODO check if this is still needed now that we use import2vox
  config.vm.provider "virtualbox" do |v|
      v.customize ["modifyvm", :id, "--cableconnected1", "on"]
  end

end

您需要编辑此文件并进行更改,或者在您当前的 Vagrantfile 中覆盖默认类型或 smb 类型。