質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
MySQL

MySQL(マイエスキューエル)は、TCX DataKonsultAB社などが開発するRDBMS(リレーショナルデータベースの管理システム)です。世界で最も人気の高いシステムで、オープンソースで開発されています。MySQLデータベースサーバは、高速性と信頼性があり、Linux、UNIX、Windowsなどの複数のプラットフォームで動作することができます。

Q&A

解決済

1回答

751閲覧

mysqlダウンロードできない問題

vasucodagama

総合スコア19

MySQL

MySQL(マイエスキューエル)は、TCX DataKonsultAB社などが開発するRDBMS(リレーショナルデータベースの管理システム)です。世界で最も人気の高いシステムで、オープンソースで開発されています。MySQLデータベースサーバは、高速性と信頼性があり、Linux、UNIX、Windowsなどの複数のプラットフォームで動作することができます。

0グッド

0クリップ

投稿2018/07/03 08:16

➜ ~ sudo gem install mysql2 -v '0.3.21' Password: Building native extensions. This could take a while... ERROR: Error installing mysql2: ERROR: Failed to build gem native extension. current directory: /Library/Ruby/Gems/2.3.0/gems/mysql2-0.3.21/ext/mysql2 /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby -r ./siteconf20180703-46977-151mij7.rb extconf.rb checking for ruby/thread.h... yes checking for rb_thread_call_without_gvl() in ruby/thread.h... yes checking for rb_thread_blocking_region()... no checking for rb_wait_for_single_fd()... yes checking for rb_hash_dup()... yes checking for rb_intern3()... yes ----- Using mysql_config at /usr/local/bin/mysql_config ----- checking for mysql.h... yes checking for errmsg.h... yes checking for mysqld_error.h... yes ----- Setting rpath to /usr/local/Cellar/mysql/8.0.11/lib ----- creating Makefile To see why this extension failed to compile, please check the mkmf.log which can be found here: /Library/Ruby/Gems/2.3.0/extensions/universal-darwin-17/2.3.0/mysql2-0.3.21/mkmf.log current directory: /Library/Ruby/Gems/2.3.0/gems/mysql2-0.3.21/ext/mysql2 make "DESTDIR=" clean current directory: /Library/Ruby/Gems/2.3.0/gems/mysql2-0.3.21/ext/mysql2 make "DESTDIR=" compiling infile.c compiling client.c client.c:439:3: error: use of undeclared identifier 'my_bool' my_bool res = mysql_read_query_result(client); ^ client.c:441:19: error: use of undeclared identifier 'res' return (void *)(res == 0 ? Qtrue : Qfalse); ^ client.c:762:3: error: use of undeclared identifier 'my_bool' my_bool boolval; ^ client.c:793:7: error: use of undeclared identifier 'boolval' boolval = (value == Qfalse ? 0 : 1); ^ client.c:794:17: error: use of undeclared identifier 'boolval' retval = &boolval; ^ client.c:797:10: error: use of undeclared identifier 'MYSQL_SECURE_AUTH'; did you mean 'MYSQL_DEFAULT_AUTH'? case MYSQL_SECURE_AUTH: ^~~~~~~~~~~~~~~~~ MYSQL_DEFAULT_AUTH /usr/local/Cellar/mysql/8.0.11/include/mysql/mysql.h:188:3: note: 'MYSQL_DEFAULT_AUTH' declared here MYSQL_DEFAULT_AUTH, ^ client.c:798:7: error: use of undeclared identifier 'boolval' boolval = (value == Qfalse ? 0 : 1); ^ client.c:799:17: error: use of undeclared identifier 'boolval' retval = &boolval; ^ client.c:830:38: error: use of undeclared identifier 'boolval' wrapper->reconnect_enabled = boolval; ^ client.c:1185:38: error: use of undeclared identifier 'MYSQL_SECURE_AUTH'; did you mean 'MYSQL_DEFAULT_AUTH'? return _mysql_client_options(self, MYSQL_SECURE_AUTH, value); ^~~~~~~~~~~~~~~~~ MYSQL_DEFAULT_AUTH /usr/local/Cellar/mysql/8.0.11/include/mysql/mysql.h:188:3: note: 'MYSQL_DEFAULT_AUTH' declared here MYSQL_DEFAULT_AUTH, ^ 10 errors generated. make: *** [client.o] Error 1 make failed, exit code 2 Gem files will remain installed in /Library/Ruby/Gems/2.3.0/gems/mysql2-0.3.21 for inspection. Results logged to /Library/Ruby/Gems/2.3.0/extensions/universal-darwin-17/2.3.0/mysql2-0.3.21/gem_make.out```ここに言語を入力 コード

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

ベストアンサー

投稿2018/07/03 16:37

tatamyiwathy

総合スコア1039

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

vasucodagama

2018/07/04 03:04

直りました。 会社の指定で'0.3.21'だったのですが、なぜ'0.3.21'ではインストールできなかったのか分かりませんか?
tatamyiwathy

2018/07/04 04:22

OSのバージョン、Rubyのバージョン、インストールした時期などで結果がかわりますよ。 前回にインストールが成功したとしても、そのあとにモジュールがバージョンアップしたなどの理由でエラーになることもあります。
vasucodagama

2018/07/04 06:28

なるほど!お忙しい中、ありがとうございます!
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問