2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

gem sqlite3がインストールできなかった。

Posted at

os情報

Mac Mojava

bundle install しよっと

An error occurred while installing sqlite3 (1.3.13), and Bundler cannot continue.
Make sure that `gem install sqlite3 -v '1.3.13' --source 'https://rubygems.org/'` succeeds before
bundling.

じゃあ gem install sqlite3 -v '1.3.13' --source 'https://rubygems.org/' を実施しよ

ERROR:  Error installing sqlite3:
	ERROR: Failed to build gem native extension.

    current directory: /Users/#{ユーザー名}/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/sqlite3-1.3.13/ext/sqlite3
/Users/#{ユーザー名}/.rbenv/versions/2.4.1/bin/ruby -r ./siteconf20181125-2414-1pdp28o.rb extconf.rb

*** 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.

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

  /Users/#{ユーザー名}/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/extensions/x86_64-darwin-17/2.4.0-static/sqlite3-1.3.13/mkmf.log

じゃあログ見ます・・・

xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun     at: /Library/Developer/CommandLineTools/usr/bin/xcrun
  • デベロッパーの権限がない?

以下を実行します!

xcode-select --install

再度実行

bundle install

Fetching sqlite3 1.3.13
Installing sqlite3 1.3.13 with native extensions
Bundle complete! 5 Gemfile dependencies, 18 gems now installed.
Bundled gems are installed into `./vendor/bundle`

めでたしめでたし!

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?