Q&A
EC2
1Gem::Ext::BuildError: ERROR: Failed to build gem native extension. 2 3 current directory: /home/ec2-user/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sqlite3-1.4.2/ext/sqlite3 4/home/ec2-user/.rbenv/versions/2.6.5/bin/ruby -I /home/ec2-user/.rbenv/versions/2.6.5/lib/ruby/2.6.0 -r ./siteconf20220610-12402-j1607o.rb 5extconf.rb 6checking for sqlite3.h... no 7sqlite3.h is missing. Try 'brew install sqlite3', 8'yum install sqlite-devel' or 'apt-get install libsqlite3-dev' 9and check your shared library search path (the 10location where your sqlite3 shared library is located). 11*** extconf.rb failed *** 12Could not create Makefile due to some reason, probably lack of necessary 13libraries and/or headers. Check the mkmf.log file for more details. You may 14need configuration options. 15 16Provided configuration options: 17 --with-opt-dir 18 --without-opt-dir 19 --with-opt-include 20 --without-opt-include=${opt-dir}/include 21 --with-opt-lib 22 --without-opt-lib=${opt-dir}/lib 23 --with-make-prog 24 --without-make-prog 25 --srcdir=. 26 --curdir 27 --ruby=/home/ec2-user/.rbenv/versions/2.6.5/bin/$(RUBY_BASE_NAME) 28 --with-sqlcipher 29 --without-sqlcipher 30 --with-sqlite3-config 31 --without-sqlite3-config 32 --with-pkg-config 33 --without-pkg-config 34 --with-sqlcipher 35 --without-sqlcipher 36 --with-sqlite3-dir 37 --without-sqlite3-dir 38 --with-sqlite3-include 39 --without-sqlite3-include=${sqlite3-dir}/include 40 --with-sqlite3-lib 41 --without-sqlite3-lib=${sqlite3-dir}/lib 42 43To see why this extension failed to compile, please check the mkmf.log which can be found here: 44 45 /home/ec2-user/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/extensions/x86_64-linux/2.6.0/sqlite3-1.4.2/mkmf.log 46 47extconf failed, exit code 1 48 49Gem files will remain installed in /home/ec2-user/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sqlite3-1.4.2 for inspection. 50Results logged to /home/ec2-user/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/extensions/x86_64-linux/2.6.0/sqlite3-1.4.2/gem_make.out 51 52An error occurred while installing sqlite3 (1.4.2), and Bundler cannot continue. 53Make sure that `gem install sqlite3 -v '1.4.2' --source 'https://rubygems.org/'` succeeds before bundling. 54 55In Gemfile: 56 sqlite3
閲覧ありがとうございます。
EC2にクローンしたアプリケーションを起動するために必要なgemをインストールしたく、
EC2上で、gem install bundler -v 2.1.4のコマンドを実行し、
次にbundle installを実行した際、
上記のようなエラーがEC2内で表示されました。
当方初学者ですので、親切な方できればわかりやすく説明と解決策をご教授していただけないでしょうか?
回答1件
下記のような回答は推奨されていません。
このような回答には修正を依頼しましょう。
2022/06/10 05:03 編集
2022/06/10 05:03
2022/06/10 05:12
2022/06/10 05:13
2022/06/10 05:18
2022/06/10 05:39
2022/06/10 06:22