在 Windows10 上使用 VirtualBox 的 Vagrant:“Rsync"在您的 PATH 中找不到 [英] Vagrant with VirtualBox on Windows10: "Rsync" could not be found on your PATH

查看:44
本文介绍了在 Windows10 上使用 VirtualBox 的 Vagrant:“Rsync"在您的 PATH 中找不到的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Windows 7 系统上使用 Vagrant 有一段时间了.现在我有一台装有 Windows 10 的新 PC.我安装了 Oracle Virtual Box 和 Vagrant,并尝试使用 vagrant up 命令启动一台机器.Vagrantfile 与我在 Windows 7 系统上使用的文件相同.这是 Vagrantfile 的内容:

I've used Vagrant for a while on a windows 7 system. Now I've a new PC with windows 10. I installed Oracle Virtual Box and Vagrant and I try to start a machine with the command vagrant up. The Vagrantfile is the same file that I used on my windows 7 system. This is the content of the Vagrantfile:

Vagrant.configure(2) do |config|
config.vm.box = "debian/jessie64"

config.vm.provider "virtualbox" do |v|
    v.customize ["modifyvm", :id, "--memory", "768"]
end
config.vm.provision :shell, path: "bootstrap.sh"

config.vm.network :private_network, ip: "172.27.146.17"
config.vm.hostname = "www.delevensstijl.hst1.nl"
config.hostsupdater.aliases = ["www.thelifestylemethod.hst1.nl"]

end

我得到的错误:在您的路径中找不到rsync".确保 rsync 已正确安装在您的系统上并且在 PATH 上可用.

The error I get: "rsync" could not be found on your PATH. Make sure that rsync is properly installed on your system and available on the PATH.

为什么 Vagrant 会在我使用 Virtualbox 后寻找 rsync?如何解决此错误?

Why is Vagrant looking for rsync since I use Virtualbox? How can I workaround this error?

推荐答案

我在另一个论坛中发现本地 Vagrant 目录通过 rsync 挂载为/vagrant".这是在框本身中设置的,您可以通过打开

I found in another forum that the local Vagrant directory is mounted as "/vagrant" via rsync. This is set in the box itself, you can check by opening

C:\Users\{your_username}\.vagrant.d\boxes\debian-VAGRANTSLASH-jessie64\8.2.2\virtualbox\Vagrantfile

C:\Users\{your_username}\.vagrant.d\boxes\debian-VAGRANTSLASH-jessie64\8.2.2\virtualbox\Vagrantfile

并查看设置

  config.vm.synced_folder \
    ".",
    "/vagrant",
    type: "rsync"

为了解决这个问题,我在本地 Vagrantfile 中添加了以下行

to get around this I added the following line in my local Vagrantfile

  config.vm.synced_folder ".", "/vagrant", type: "virtualbox"

错误已解决

这篇关于在 Windows10 上使用 VirtualBox 的 Vagrant:“Rsync"在您的 PATH 中找不到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆