vagrant up 抛出以下命令以非零退出状态响应

vagrant up 抛出以下命令以非零退出状态响应

在执行 vagrant up 期间,出现以下错误:

The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

mount -o vers=3,udp 192.168.33.1:/Users/freid/www/projects /vagrant

Stdout from the command:



Stderr from the command:

mount.nfs: requested NFS version or transport protocol is not supported

我的 Vagrant 文件如下所示:

Vagrant.configure("2") do |config|
config.vm.provider :virtualbox do |v|
    v.name = "projects"
    v.customize [
        "modifyvm", :id,
        "--name", "projects",
        "--memory", 2048,
        "--natdnshostresolver1", "on",
        "--cpus", 1,
    ]
end

config.vm.box = "ubuntu/trusty64"

config.vm.network :private_network, ip: "192.168.33.71"
config.ssh.forward_agent = true

config.vm.synced_folder "./", "/vagrant", type: "nfs"   
end

我已经运行 vagrant box update 并将我的 vagrant 版本更新到最新的 v1.9.5

我正尝试在我的 Mac 机器上将其设置为本地开发环境,但我做错了什么,有什么建议吗?

谢谢

答案1

将 127.0.0.1 localhost 添加到 /etc/hosts 文件后,问题似乎已经消失。

相关内容