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

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

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

Rubyはプログラミング言語のひとつで、オープンソース、オブジェクト指向のプログラミング開発に対応しています。

Q&A

0回答

504閲覧

mysql2インストール失敗

roajyosai

総合スコア0

Ruby

Rubyはプログラミング言語のひとつで、オープンソース、オブジェクト指向のプログラミング開発に対応しています。

0グッド

0クリップ

投稿2021/05/17 07:45

前提・実現したいこと

Win10 GEMを利用しmysql2インストール中以下のエラーが発生ました。
大変困ってます。初めて学ぶプログラミングで関連する知識もなくネットで対策を読んでもよく理解できません。

発生している問題・エラーメッセージ

エラーメッセージ

Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.

Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=C:/Ruby30/bin/$(RUBY_BASE_NAME)
--with-mysql-dir
--without-mysql-dir
--with-mysql-include
--without-mysql-include=${mysql-dir}/include
--with-mysql-lib
--without-mysql-lib=${mysql-dir}/lib
--with-mysql-config
--without-mysql-config
--with-mysqlclient-dir
--without-mysqlclient-dir
--with-mysqlclient-include
--without-mysqlclient-include=${mysqlclient-dir}/include
--with-mysqlclient-lib
--without-mysqlclient-lib=${mysqlclient-dir}/lib
--with-mysqlclientlib
--without-mysqlclientlib
C:/Ruby30/lib/ruby/3.0.0/mkmf.rb:1050:in block in find_library': undefined method split' for nil:NilClass (NoMethodError)
from C:/Ruby30/lib/ruby/3.0.0/mkmf.rb:1050:in collect' from C:/Ruby30/lib/ruby/3.0.0/mkmf.rb:1050:in find_library'
from extconf.rb:87:in `<main>'

To see why this extension failed to compile, please check the mkmf.log which can be found here:

C:/Ruby30/lib/ruby/gems/3.0.0/extensions/x86-mingw32/3.0.0/mysql2-0.5.3/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in C:/Ruby30/lib/ruby/gems/3.0.0/gems/mysql2-0.5.3 for inspection.
Results logged to C:/Ruby30/lib/ruby/gems/3.0.0/extensions/x86-mingw32/3.0.0/mysql2-0.5.3/gem_make.out
Fetching v-0.1.1.gem
Fetching fastthread-1.0.7.gem
Building native extensions. This could take a while...
ERROR: Error installing v:
ERROR: Failed to build gem native extension.

current directory: C:/Ruby30/lib/ruby/gems/3.0.0/gems/fastthread-1.0.7/ext/fastthread

C:/Ruby30/bin/ruby.exe -I C:/Ruby30/lib/ruby/3.0.0 -r ./siteconf20210517-5288-vnb5g0.rb extconf.rb
extconf.rb:13:in block in <main>': uninitialized constant Config (NameError) Did you mean? RbConfig from extconf.rb:12:in open'
from extconf.rb:12:in `<main>'

extconf failed, exit code 1

Gem files will remain installed in C:/Ruby30/lib/ruby/gems/3.0.0/gems/fastthread-1.0.7 for inspection.
Results logged to C:/Ruby30/lib/ruby/gems/3.0.0/extensions/x86-mingw32/3.0.0/fastthread-1.0.7/gem_make.out
ERROR: Could not find a valid gem '0.5.2' (>= 0) in any repository

C:\Users\user02>

該当のソースコード

ソースコード

試したこと

どこかのサイトにmysqlをインストールしては、とありまいたのでやってみたのですがうまくいきませんでした。

補足情報(FW/ツールのバージョンなど)

ここにより詳細な情報を記載してください。

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

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

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

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

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

m.ts10806

2021/05/17 07:56

Windows環境でちゃんとした開発環境整えようとしたら茨の道なので、WSLなり仮想環境なりLinux系OSにされたほうがストレス少ないですよ
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだ回答がついていません

会員登録して回答してみよう

アカウントをお持ちの方は

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

ただいまの回答率
85.48%

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

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

質問する

関連した質問