0

我在我的机器(MacBookPro)上运行了一个运行良好的 VirtualBox 上的 Vagrantfile。然后我安装了另一个 Vagrantfile。

即使我摧毁了它们,我仍然无法加载它vagrant up

我手动关闭了所有虚拟机,但仍然出现此错误...

$ vagrant up

There was an error loading a Vagrantfile. The file being loaded and the error message are shown below. This is usually caused by a syntax error.    

Path: /Users/actual_username/.vagrant.d/boxes/actual_vagrantfile_name/0.3-centos-actualSNAPSHOT_number/virtualbox/Vagrantfile
Line number: 0
Message: NameError: undefined local variable or method `config' for main:Object
4

1 回答 1

0

您可能需要 Vagrant.configure("2") do |config|在 vagrantfile 中使用配置变量的任何位置添加。

于 2018-10-25T10:46:48.610 回答