我正在使用macOS Mojave。在安装了VirtualBox和Vagrant之后,我尝试运行"vagrant up"命令。然而,我遇到了以下奇怪的错误:
Dir: VA $vagrant up
sh: netsh: command not found
sh: cscript: command not found
It seems that you don't have the privileges to change
the firewall rules. NFS will not work without that
firewall changes. Execute the following commands via
cmd as administrator:
netsh advfirewall firewall add rule
name="VagrantWinNFSd-1.4.0" dir="in" action=allow
protocol=any
program="\Users\Ten\.vagrant.d\gems\2.4.4\gems\vagrant
...
似乎 netsh 和 cscript 命令属于 Windows。然而,我正在使用 macOS,并且我确定我的 VirtualBox 和 Vagrant 是为 macOS 设计的。
有人能帮我解决这个问题吗?谢谢!
===================== 更新 ===================
最终我解决了这个问题。但是很抱歉我忘记了我在这里提出了问题,更糟糕的是我忘记了如何解决它。
我唯一记得的是,首先安装 VirtualBox,然后再安装 Vagrant 是重要的。重新安装可能会有所帮助。
希望这能有所帮助。
vagrant up
命令最终失败于in
nfs_export': wrong number of arguments (given 4, expected 5)`。即使我禁用了 nfs。 - Timo002