MacBookのターミナルで環境構築を行ってています。
vagrantに接続しようとすると以下のエラーメッセージが発生しました。
エラー
syntax error, unexpected tIDENTIFIER, expecting keyword_do or '{' or '('
which allows host-only access to the machine
ソース
$ vagrant up
$ vagrant ssh
試したこと
vagrant,virtualボックス削除、再インストール
VBoxManage -v 6.0.0r127566
vagrant --version Vagrant 2.2.3
vagrantfile内容
-- 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|
The most common configuration options are documented and commented below.
For a complete reference, please see the online documentation at
https://docs.vagrantup.com.
Every Vagrant development environment requires a box. You can search for
boxes at https://vagrantcloud.com/search.
config.vm.box = "centos/7"
Disable automatic box update checking. If you disable this, then
boxes will only be checked for updates when the user runs
vagrant box outdated
. This is not recommended.
config.vm.box_check_update = false
Create a forwarded port mapping which allows access to a specific port
within the machine from a port on the host machine. In the example below,
accessing "localhost:8080" will access port 80 on the guest machine.
NOTE: This will enable public access to the opened port
config.vm.network "forwarded_port", guest: 80, host: 8080
macOS Sierra 10.12.6
回答1件
あなたの回答
tips
プレビュー