質問編集履歴

1

回答を受けコマンドを実行

2019/10/25 07:27

投稿

kotahayashi
test CHANGED
File without changes
test CHANGED
@@ -170,175 +170,17 @@
170
170
 
171
171
  https://teratail.com/questions/218281
172
172
 
173
- こちらと、いただいたご回答から、
174
-
175
- ・~/.zshrcファイルを作り、
176
-
177
- ```
178
-
179
- if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi
173
+ こちらの質問・回答が参考になるかと思いましたが、エラーメッセージが少し異なること、zshrcの編集方法がわからない(ロックがかかっている)ことから、困っています。
180
-
181
- export PATH="$HOME/.rbenv/bin:$PATH"
182
-
183
- eval "$(rbenv init -)"
184
-
185
- ```
186
-
187
- を記述。
188
174
 
189
175
 
190
176
 
191
- ・source ~/.zshrcを実行し、which ruby の実行結果
177
+ which ruby の実行結果
192
178
 
193
- /usr/bin/rubyから/Users/ユーザ名/.rbenv/shims/ruby
179
+ /usr/bin/ruby
194
180
 
195
- に変わった
181
+ です。
196
182
 
197
183
 
198
-
199
- ・brew install rbenv ruby-buildを実行してからbundle installを実行したが、
200
-
201
- 実行結果は変わらず、続いてエラーメッセージで指示された
202
-
203
- gem install mysql2 -v '0.4.10' --source 'https://rubygems.org/'
204
-
205
- を実行した結果が以下のとおりです。
206
-
207
- ```
208
-
209
- Building native extensions. This could take a while...
210
-
211
- ERROR: Error installing mysql2:
212
-
213
- ERROR: Failed to build gem native extension.
214
-
215
-
216
-
217
- current directory: /Users/ユーザ名/.rbenv/versions/2.3.6/lib/ruby/gems/2.3.0/gems/mysql2-0.4.10/ext/mysql2
218
-
219
- /Users/ユーザ名/.rbenv/versions/2.3.6/bin/ruby -r ./siteconf20191025-5257-9uxwbc.rb extconf.rb
220
-
221
- checking for rb_absint_size()... yes
222
-
223
- checking for rb_absint_singlebit_p()... yes
224
-
225
- checking for ruby/thread.h... yes
226
-
227
- checking for rb_thread_call_without_gvl() in ruby/thread.h... yes
228
-
229
- checking for rb_thread_blocking_region()... no
230
-
231
- checking for rb_wait_for_single_fd()... yes
232
-
233
- checking for rb_hash_dup()... yes
234
-
235
- checking for rb_intern3()... yes
236
-
237
- checking for rb_big_cmp()... yes
238
-
239
- -----
240
-
241
- Using mysql_config at /usr/local/bin/mysql_config
242
-
243
- -----
244
-
245
- checking for mysql.h... yes
246
-
247
- checking for errmsg.h... yes
248
-
249
- checking for SSL_MODE_DISABLED in mysql.h... yes
250
-
251
- checking for SSL_MODE_PREFERRED in mysql.h... yes
252
-
253
- checking for SSL_MODE_REQUIRED in mysql.h... yes
254
-
255
- checking for SSL_MODE_VERIFY_CA in mysql.h... yes
256
-
257
- checking for SSL_MODE_VERIFY_IDENTITY in mysql.h... yes
258
-
259
- checking for MYSQL.net.vio in mysql.h... yes
260
-
261
- checking for MYSQL.net.pvio in mysql.h... no
262
-
263
- checking for MYSQL_ENABLE_CLEARTEXT_PLUGIN in mysql.h... yes
264
-
265
- -----
266
-
267
- Don't know how to set rpath on your system, if MySQL libraries are not in path mysql2 may not load
268
-
269
- -----
270
-
271
- -----
272
-
273
- Setting libpath to /usr/local/Cellar/mysql/5.7.19/lib
274
-
275
- -----
276
-
277
- creating Makefile
278
-
279
-
280
-
281
- To see why this extension failed to compile, please check the mkmf.log which can be found here:
282
-
283
-
284
-
285
- /Users/ユーザ名/.rbenv/versions/2.3.6/lib/ruby/gems/2.3.0/extensions/x86_64-darwin-17/2.3.0-static/mysql2-0.4.10/mkmf.log
286
-
287
-
288
-
289
- current directory: /Users/ユーザ名/.rbenv/versions/2.3.6/lib/ruby/gems/2.3.0/gems/mysql2-0.4.10/ext/mysql2
290
-
291
- make "DESTDIR=" clean
292
-
293
-
294
-
295
- current directory: /Users/ユーザ名/.rbenv/versions/2.3.6/lib/ruby/gems/2.3.0/gems/mysql2-0.4.10/ext/mysql2
296
-
297
- make "DESTDIR="
298
-
299
- compiling infile.c
300
-
301
- compiling client.c
302
-
303
- compiling mysql2_ext.c
304
-
305
- compiling statement.c
306
-
307
- compiling result.c
308
-
309
- result.c:326:40: warning: incompatible pointer types assigning to 'my_bool *' (aka 'char *') from 'bool *' [-Wincompatible-pointer-types]
310
-
311
- wrapper->result_buffers[i].is_null = &wrapper->is_null[i];
312
-
313
- ^ ~~~~~~~~~~~~~~~~~~~~
314
-
315
- result.c:328:40: warning: incompatible pointer types assigning to 'my_bool *' (aka 'char *') from 'bool *' [-Wincompatible-pointer-types]
316
-
317
- wrapper->result_buffers[i].error = &wrapper->error[i];
318
-
319
- ^ ~~~~~~~~~~~~~~~~~~
320
-
321
- 2 warnings generated.
322
-
323
- linking shared-object mysql2/mysql2.bundle
324
-
325
- ld: library not found for -lssl
326
-
327
- clang: error: linker command failed with exit code 1 (use -v to see invocation)
328
-
329
- make: *** [mysql2.bundle] Error 1
330
-
331
-
332
-
333
- make failed, exit code 2
334
-
335
-
336
-
337
- Gem files will remain installed in /Users/ユーザ名/.rbenv/versions/2.3.6/lib/ruby/gems/2.3.0/gems/mysql2-0.4.10 for inspection.
338
-
339
- Results logged to /Users/ユーザ名/.rbenv/versions/2.3.6/lib/ruby/gems/2.3.0/extensions/x86_64-darwin-17/2.3.0-static/mysql2-0.4.10/gem_make.out
340
-
341
- ```
342
184
 
343
185
  ### 補足情報(FW/ツールのバージョンなど)
344
186