-OS: Ubuntu 18.04.1 LTS (WSL windows10
-Rails 5.2.3
『Ruby on Rails 5 速習実践ガイド』という参考書を進めていく中で発生したエラーになります。
エラー内容
$ gem install mailcatcher Building native extensions. This could take a while... /home/user/.rbenv/versions/2.5.1/lib/ruby/site_ruby/2.5.0/rubygems/ext/builder.rb:76: warning: Insecure world writable dir /home/user/.rbenv/versions in PATH, mode 040777 ERROR: Error installing mailcatcher: ERROR: Failed to build gem native extension. current directory: /home/user/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/sqlite3-1.4.1/ext/sqlite3 /home/user/.rbenv/versions/2.5.1/bin/ruby -I /home/user/.rbenv/versions/2.5.1/lib/ruby/site_ruby/2.5.0 -r ./siteconf20190507-29200-16af24m.rb extconf.rb /home/user/.rbenv/versions/2.5.1/lib/ruby/2.5.0/mkmf.rb:1553: warning: Insecure world writable dir /home/user/.rbenv/versions in PATH, mode 040777 checking for sqlite3.h... no sqlite3.h is missing. Try 'brew install sqlite3', 'yum install sqlite-devel' or 'apt-get install libsqlite3-dev' and check your shared library search path (the location where your sqlite3 shared library is located). *** extconf.rb failed *** 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=/home/user/.rbenv/versions/2.5.1/bin/$(RUBY_BASE_NAME) --with-sqlcipher --without-sqlcipher --with-sqlite3-config --without-sqlite3-config --with-pkg-config --without-pkg-config --with-sqlcipher --without-sqlcipher --with-sqlite3-dir --without-sqlite3-dir --with-sqlite3-include --without-sqlite3-include=${sqlite3-dir}/include --with-sqlite3-lib --without-sqlite3-lib=${sqlite3-dir}/lib To see why this extension failed to compile, please check the mkmf.log which can be found here: /home/user/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/extensions/x86_64-linux/2.5.0-static/sqlite3-1.4.1/mkmf.log extconf failed, exit code 1 Gem files will remain installed in /home/user/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/sqlite3-1.4.1 for inspection. Results logged to /home/user/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/extensions/x86_64-linux/2.5.0-static/sqlite3-1.4.1/gem_make.out
エラー内容を見てみて下記の文言があったので
sqlite3.h is missing. Try 'brew install sqlite3', 'yum install sqlite-devel' or 'apt-get install libsqlite3-dev'
下記のコマンドを実行。
sudo apt install git sqlite3
それでも解決しない状況です。(エラーの内容に変わりはないです。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2019/05/08 04:20