前提・実現したいこと
railsでTwitterのようなアプリを作成しようと思い、
bundle installを入力すると以下のようなエラーメッセージが表示されました。
今まで出てこなかったため、悩んでいます。
どなたかご教示いただければ嬉しいです。
発生している問題・エラーメッセージ
Fetching
1Installing mysql2 0.4.10 with native extensions 2Gem::Ext::BuildError: ERROR: Failed to build gem native extension. 3 4 current directory: /home/ec2-user/.rvm/gems/ruby-2.6.3/gems/mysql2-0.4.10/ext/mysql2 5/home/ec2-user/.rvm/rubies/ruby-2.6.3/bin/ruby -I /home/ec2-user/.rvm/rubies/ruby-2.6.3/lib/ruby/site_ruby/2.6.0 -r ./siteconf20191209-24727-1s4iw6a.rb 6extconf.rb --with-ldflags\=-L/usr/local/opt/openssl/lib\ --with-cppf\ 7checking for rb_absint_size()... *** extconf.rb failed *** 8Could not create Makefile due to some reason, probably lack of necessary 9libraries and/or headers. Check the mkmf.log file for more details. You may 10need configuration options. 11 12Provided configuration options: 13 --with-opt-dir 14 --without-opt-dir 15 --with-opt-include 16 --without-opt-include=${opt-dir}/include 17 --with-opt-lib 18 --without-opt-lib=${opt-dir}/lib 19 --with-make-prog 20 --without-make-prog 21 --srcdir=. 22 --curdir 23 --ruby=/home/ec2-user/.rvm/rubies/ruby-2.6.3/bin/$(RUBY_BASE_NAME) 24/home/ec2-user/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/mkmf.rb:467:in `try_do': The compiler failed to generate an executable file. (RuntimeError) 25You have to install development tools first. 26 from /home/ec2-user/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/mkmf.rb:552:in `try_link0' 27 from /home/ec2-user/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/mkmf.rb:570:in `try_link' 28 from /home/ec2-user/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/mkmf.rb:782:in `try_func' 29 from /home/ec2-user/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/mkmf.rb:1069:in `block in have_func' 30 from /home/ec2-user/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/mkmf.rb:959:in `block in checking_for' 31 from /home/ec2-user/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/mkmf.rb:361:in `block (2 levels) in postpone' 32 from /home/ec2-user/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/mkmf.rb:331:in `open' 33 from /home/ec2-user/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/mkmf.rb:361:in `block in postpone' 34 from /home/ec2-user/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/mkmf.rb:331:in `open' 35 from /home/ec2-user/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/mkmf.rb:357:in `postpone' 36 from /home/ec2-user/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/mkmf.rb:958:in `checking_for' 37 from /home/ec2-user/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/mkmf.rb:1068:in `have_func' 38 from extconf.rb:26:in `<main>' 39 40To see why this extension failed to compile, please check the mkmf.log which can be found here: 41 42 /home/ec2-user/.rvm/gems/ruby-2.6.3/extensions/x86_64-linux/2.6.0/mysql2-0.4.10/mkmf.log 43 44extconf failed, exit code 1 45 46Gem files will remain installed in /home/ec2-user/.rvm/gems/ruby-2.6.3/gems/mysql2-0.4.10 for inspection. 47Results logged to /home/ec2-user/.rvm/gems/ruby-2.6.3/extensions/x86_64-linux/2.6.0/mysql2-0.4.10/gem_make.out 48 49An error occurred while installing mysql2 (0.4.10), and Bundler cannot continue. 50Make sure that `gem install mysql2 -v '0.4.10' --source 'https://rubygems.org/'` succeeds before bundling. 51
試したこと
様々なサイトの対処法を試したのですが、
エラーが無くなりません。
補足情報(FW/ツールのバージョンなど)
> 様々なサイトの対処法を試したのですが、
試したことを書きましょう。
mkmf.log や gem_make.out は見たんですか?