質問編集履歴

2

```で囲みました。vagrantfileを追加いたしました

2020/04/26 05:18

投稿

hikky2020
hikky2020

スコア0

test CHANGED
File without changes
test CHANGED
@@ -8,7 +8,7 @@
8
8
 
9
9
  ### 発生している問題・エラーメッセージ
10
10
 
11
- /Users/tomoriakira/.zshrc:export:4: not valid in this context: export PATH
11
+ ```/Users/tomoriakira/.zshrc:export:4: not valid in this context: export PATH
12
12
 
13
13
  tomoriakira@tomoriakiranoMacBook-Air ~ % cd ~\vagrant\ubuntu64_18
14
14
 
@@ -40,9 +40,151 @@
40
40
 
41
41
  Message: undefined local variable or method ` config'
42
42
 
43
- tomoriakira@tomoriakiranoMacBook-Air ubuntu64_18 %
43
+ tomoriakira@tomoriakiranoMacBook-Air ubuntu64_18 %```
44
+
45
+
46
+
44
-
47
+ vagrantfileの中身
48
+
45
-
49
+ ```# -*- mode: ruby -*-
50
+
51
+ # vi: set ft=ruby :
52
+
53
+
54
+
55
+ # All Vagrant configuration is done below. The "2" in Vagrant.configure
56
+
57
+ # configures the configuration version (we support older styles for
58
+
59
+ # backwards compatibility). Please don't change it unless you know what
60
+
61
+ # you're doing.
62
+
63
+ Vagrant.configure("2") do |config|
64
+
65
+ # The most common configuration options are documented and commented below.
66
+
67
+ # For a complete reference, please see the online documentation at
68
+
69
+ # https://docs.vagrantup.com.
70
+
71
+
72
+
73
+ # Every Vagrant development environment requires a box. You can search for
74
+
75
+ # boxes at https://vagrantcloud.com/search.
76
+
77
+ config.vm.box = "ubuntu/bionic64"
78
+
79
+
80
+
81
+ # Disable automatic box update checking. If you disable this, then
82
+
83
+ # boxes will only be checked for updates when the user runs
84
+
85
+ # `vagrant box outdated`. This is not recommended.
86
+
87
+ # config.vm.box_check_update = false
88
+
89
+
90
+
91
+ # Create a forwarded port mapping which allows access to a specific port
92
+
93
+ # within the machine from a port on the host machine. In the example below,
94
+
95
+ # accessing "localhost:8080" will access port 80 on the guest machine.
96
+
97
+ # NOTE: This will enable public access to the opened port
98
+
99
+ # config.vm.network "forwarded_port", guest: 80, host: 8080
100
+
101
+  config.vm.network "forwarded_port", guest: 8000, host: 8000
102
+
103
+ # Create a forwarded port mapping which allows access to a specific port
104
+
105
+ # within the machine from a port on the host machine and only allow access
106
+
107
+ # via 127.0.0.1 to disable public access
108
+
109
+ # config.vm.network "forwarded_port", guest: 80, host: 8080, host_ip: "127.0.0.1"
110
+
111
+
112
+
113
+ # Create a private network, which allows host-only access to the machine
114
+
115
+ # using a specific IP.
116
+
117
+ # config.vm.network "private_network", ip: "192.168.33.10"
118
+
119
+
120
+
121
+ # Create a public network, which generally matched to bridged network.
122
+
123
+ # Bridged networks make the machine appear as another physical device on
124
+
125
+ # your network.
126
+
127
+ # config.vm.network "public_network"
128
+
129
+
130
+
131
+ # Share an additional folder to the guest VM. The first argument is
132
+
133
+ # the path on the host to the actual folder. The second argument is
134
+
135
+ # the path on the guest to mount the folder. And the optional third
136
+
137
+ # argument is a set of non-required options.
138
+
139
+ # config.vm.synced_folder "../data", "/vagrant_data"
140
+
141
+ config.vm.synced_folder "./workspace", "/home/vagrant/workspace"
142
+
143
+ # Provider-specific configuration so you can fine-tune various
144
+
145
+ # backing providers for Vagrant. These expose provider-specific options.
146
+
147
+ # Example for VirtualBox:
148
+
149
+ #
150
+
151
+ config.vm.provider "virtualbox" do |vb|
152
+
153
+ # # Display the VirtualBox GUI when booting the machine
154
+
155
+ # vb.gui = true
156
+
157
+ #
158
+
159
+ # # Customize the amount of memory on the VM:
160
+
161
+ vb.memory = "1024"
162
+
163
+ end
164
+
165
+ #
166
+
167
+ # View the documentation for the provider you are using for more
168
+
169
+ # information on available options.
170
+
171
+
172
+
173
+ # Enable provisioning with a shell script. Additional provisioners such as
174
+
175
+ # Ansible, Chef, Docker, Puppet and Salt are also available. Please see the
176
+
177
+ # documentation for more information about their specific syntax and use.
178
+
179
+ # config.vm.provision "shell", inline: <<-SHELL
180
+
181
+ # apt-get update
182
+
183
+ # apt-get install -y apache2
184
+
185
+ # SHELL
186
+
187
+ end```
46
188
 
47
189
  ```### 該当のソースコード
48
190
 

1

全体をコピペしました。

2020/04/26 05:18

投稿

hikky2020
hikky2020

スコア0

test CHANGED
File without changes
test CHANGED
@@ -8,9 +8,19 @@
8
8
 
9
9
  ### 発生している問題・エラーメッセージ
10
10
 
11
+ /Users/tomoriakira/.zshrc:export:4: not valid in this context: export PATH
12
+
13
+ tomoriakira@tomoriakiranoMacBook-Air ~ % cd ~\vagrant\ubuntu64_18
14
+
15
+ zsh: no such user or named directory: vagrantubuntu64_18
16
+
17
+ tomoriakira@tomoriakiranoMacBook-Air ~ % mkdir -p ~/vagrant/ubuntu64_18
18
+
19
+ tomoriakira@tomoriakiranoMacBook-Air ~ % cd ~/vagrant/ubuntu64_18
11
20
 
12
21
 
22
+
13
- ユーザー名:ubuntu64_18 ユーザー名$ vagrant up
23
+ tomoriakira@tomoriakiranoMacBook-Air ubuntu64_18 % vagrant up
14
24
 
15
25
  Vagrant failed to initialize at a very early stage:
16
26
 
@@ -24,17 +34,17 @@
24
34
 
25
35
 
26
36
 
27
- Path: /Users/ユーザー名/vagrant/ubuntu64_18/Vagrantfile
37
+ Path: /Users/tomoriakira/vagrant/ubuntu64_18/Vagrantfile
28
38
 
29
39
  Line number: 0
30
40
 
31
41
  Message: undefined local variable or method ` config'
32
42
 
33
- ```
43
+ tomoriakira@tomoriakiranoMacBook-Air ubuntu64_18 %
34
44
 
35
45
 
36
46
 
37
- ### 該当のソースコード
47
+ ```### 該当のソースコード
38
48
 
39
49
 
40
50