vagrant up throws 以下指令以非零退出狀態回應

vagrant up throws 以下指令以非零退出狀態回應

在執行 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 檔案後。這個問題似乎已經消失了。

相關內容