当我尝试将以下脚本作为 shell 脚本运行时,我收到一条错误消息
./install_local.sh: line 8: syntax error near unexpected token `"2"'
./install_local.sh: line 8: `Vagrant.configure("2") do |config|'
这可能是什么原因?流浪来源
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.network "private_network", ip: "192.168.33.10"
config.vm.provider "virtualbox" do |vb|
vb.memory = "2048"
end
config.vm.provision "shell", inline: <<-SHELL
SHELL
end