質問編集履歴
1
回答を受けコマンドを実行
title
CHANGED
File without changes
|
body
CHANGED
@@ -84,12 +84,91 @@
|
|
84
84
|
### 試したこと
|
85
85
|
|
86
86
|
https://teratail.com/questions/218281
|
87
|
+
こちらと、いただいたご回答から、
|
88
|
+
・~/.zshrcファイルを作り、
|
89
|
+
```
|
87
|
-
|
90
|
+
if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi
|
91
|
+
export PATH="$HOME/.rbenv/bin:$PATH"
|
92
|
+
eval "$(rbenv init -)"
|
93
|
+
```
|
94
|
+
を記述。
|
88
95
|
|
89
|
-
which ruby の実行結果
|
96
|
+
・source ~/.zshrcを実行し、which ruby の実行結果が
|
90
|
-
/usr/bin/ruby
|
97
|
+
/usr/bin/rubyから/Users/ユーザ名/.rbenv/shims/ruby
|
91
|
-
|
98
|
+
に変わった
|
92
99
|
|
100
|
+
・brew install rbenv ruby-buildを実行してからbundle installを実行したが、
|
101
|
+
実行結果は変わらず、続いてエラーメッセージで指示された
|
102
|
+
gem install mysql2 -v '0.4.10' --source 'https://rubygems.org/'
|
103
|
+
を実行した結果が以下のとおりです。
|
104
|
+
```
|
105
|
+
Building native extensions. This could take a while...
|
106
|
+
ERROR: Error installing mysql2:
|
107
|
+
ERROR: Failed to build gem native extension.
|
108
|
+
|
109
|
+
current directory: /Users/ユーザ名/.rbenv/versions/2.3.6/lib/ruby/gems/2.3.0/gems/mysql2-0.4.10/ext/mysql2
|
110
|
+
/Users/ユーザ名/.rbenv/versions/2.3.6/bin/ruby -r ./siteconf20191025-5257-9uxwbc.rb extconf.rb
|
111
|
+
checking for rb_absint_size()... yes
|
112
|
+
checking for rb_absint_singlebit_p()... yes
|
113
|
+
checking for ruby/thread.h... yes
|
114
|
+
checking for rb_thread_call_without_gvl() in ruby/thread.h... yes
|
115
|
+
checking for rb_thread_blocking_region()... no
|
116
|
+
checking for rb_wait_for_single_fd()... yes
|
117
|
+
checking for rb_hash_dup()... yes
|
118
|
+
checking for rb_intern3()... yes
|
119
|
+
checking for rb_big_cmp()... yes
|
120
|
+
-----
|
121
|
+
Using mysql_config at /usr/local/bin/mysql_config
|
122
|
+
-----
|
123
|
+
checking for mysql.h... yes
|
124
|
+
checking for errmsg.h... yes
|
125
|
+
checking for SSL_MODE_DISABLED in mysql.h... yes
|
126
|
+
checking for SSL_MODE_PREFERRED in mysql.h... yes
|
127
|
+
checking for SSL_MODE_REQUIRED in mysql.h... yes
|
128
|
+
checking for SSL_MODE_VERIFY_CA in mysql.h... yes
|
129
|
+
checking for SSL_MODE_VERIFY_IDENTITY in mysql.h... yes
|
130
|
+
checking for MYSQL.net.vio in mysql.h... yes
|
131
|
+
checking for MYSQL.net.pvio in mysql.h... no
|
132
|
+
checking for MYSQL_ENABLE_CLEARTEXT_PLUGIN in mysql.h... yes
|
133
|
+
-----
|
134
|
+
Don't know how to set rpath on your system, if MySQL libraries are not in path mysql2 may not load
|
135
|
+
-----
|
136
|
+
-----
|
137
|
+
Setting libpath to /usr/local/Cellar/mysql/5.7.19/lib
|
138
|
+
-----
|
139
|
+
creating Makefile
|
140
|
+
|
141
|
+
To see why this extension failed to compile, please check the mkmf.log which can be found here:
|
142
|
+
|
143
|
+
/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
|
144
|
+
|
145
|
+
current directory: /Users/ユーザ名/.rbenv/versions/2.3.6/lib/ruby/gems/2.3.0/gems/mysql2-0.4.10/ext/mysql2
|
146
|
+
make "DESTDIR=" clean
|
147
|
+
|
148
|
+
current directory: /Users/ユーザ名/.rbenv/versions/2.3.6/lib/ruby/gems/2.3.0/gems/mysql2-0.4.10/ext/mysql2
|
149
|
+
make "DESTDIR="
|
150
|
+
compiling infile.c
|
151
|
+
compiling client.c
|
152
|
+
compiling mysql2_ext.c
|
153
|
+
compiling statement.c
|
154
|
+
compiling result.c
|
155
|
+
result.c:326:40: warning: incompatible pointer types assigning to 'my_bool *' (aka 'char *') from 'bool *' [-Wincompatible-pointer-types]
|
156
|
+
wrapper->result_buffers[i].is_null = &wrapper->is_null[i];
|
157
|
+
^ ~~~~~~~~~~~~~~~~~~~~
|
158
|
+
result.c:328:40: warning: incompatible pointer types assigning to 'my_bool *' (aka 'char *') from 'bool *' [-Wincompatible-pointer-types]
|
159
|
+
wrapper->result_buffers[i].error = &wrapper->error[i];
|
160
|
+
^ ~~~~~~~~~~~~~~~~~~
|
161
|
+
2 warnings generated.
|
162
|
+
linking shared-object mysql2/mysql2.bundle
|
163
|
+
ld: library not found for -lssl
|
164
|
+
clang: error: linker command failed with exit code 1 (use -v to see invocation)
|
165
|
+
make: *** [mysql2.bundle] Error 1
|
166
|
+
|
167
|
+
make failed, exit code 2
|
168
|
+
|
169
|
+
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.
|
170
|
+
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
|
171
|
+
```
|
93
172
|
### 補足情報(FW/ツールのバージョンなど)
|
94
173
|
|
95
174
|
OS:macOS Catalina 10.15
|