###環境
macOS Sierra 10.12
Ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin16]
Rails 4.2.5.1
Sqlite3 Path: /usr/bin/sqlite3
###試したこと
$ gem install sqlite3
$ gem install sqlite3 -v '1.3.12'
$ gem install sqlite3-ruby
(上の三つとも、インストールはできますが、bundle installをすると全く同じエラーが出ました。)
$ brew install sqlite3 Warning: sqlite-3.15.0 already installed
(違うと思いながらもbrewで一応やってみたのですがインストール済みで変わらず。。)
$ brew install mysql-devel Error: No available formula with the name "mysql-devel" ==> Searching for similarly named formulae... Error: No similarly named formulae found. ==> Searching taps... Error: No formulae found in taps.
extconf.rb failedと出ていたのでそれについて調べたところ、yumでsqlite-develなるものをインストールすればいいと出たのですが当方Macでして使えず、適当にyumをbrewに変えてみたのですがうまくいかず。。(当たり前や)
###エラー内容
run bundle install Don't run Bundler as root. Bundler can ask for sudo if it is needed, and installing your bundle as root will break this application for all non-root users on this machine. Fetching gem metadata from https://rubygems.org/........... Fetching version metadata from https://rubygems.org/... Fetching dependency metadata from https://rubygems.org/.. Resolving dependencies..... Rubygems 2.0.14.1 is not threadsafe, so your gems will be installed one at a time. Upgrade to Rubygems 2.1.0 or higher to enable parallel gem installation. Using rake 11.3.0 Using i18n 0.7.0 Using json 1.8.3 Using minitest 5.9.1 Using thread_safe 0.3.5 Using builder 3.2.2 Using erubis 2.7.0 Using mini_portile2 2.1.0 Using rack 1.6.4 Using mime-types-data 3.2016.0521 Using arel 6.0.3 Using debug_inspector 0.0.2 Using bundler 1.11.2 Using byebug 9.0.6 Using coffee-script-source 1.10.0 Using execjs 2.7.0 Using thor 0.19.1 Using concurrent-ruby 1.0.2 Using multi_json 1.12.1 Using sass 3.4.22 Using tilt 2.0.5 Installing sqlite3 1.3.12 with native extensions Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb Error: Running Homebrew as root is extremely dangerous. As Homebrew does not drop privileges on installation you are giving all build scripts full access to your system. As a result of the macOS sandbox not handling the root user correctly HOMEBREW_NO_SANDBOX has been set so the sandbox will not be used. If we have not merged a pull request to add privilege dropping by November 1st 2016 running Homebrew as root will be disabled. No Homebrew maintainers plan to work on this functionality. checking for sqlite3.h... yes checking for pthread_create() in -lpthread... yes checking for sqlite3_libversion_number() in -lsqlite3... no sqlite3 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=/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby --with-sqlite3-config --without-sqlite3-config --with-pkg-config --without-pkg-config --with-sqlite3-dir --without-sqlite3-dir --with-sqlite3-include --without-sqlite3-include=${sqlite3-dir}/include --with-sqlite3-lib --without-sqlite3-lib=${sqlite3-dir}/ --with-pthreadlib --without-pthreadlib --with-sqlite3lib --without-sqlite3lib Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/sqlite3-1.3.12 for inspection. Results logged to /Library/Ruby/Gems/2.0.0/gems/sqlite3-1.3.12/ext/sqlite3/gem_make.out Using turbolinks-source 5.0.0 Using rdoc 4.2.2 Using tzinfo 1.2.2 Installing nokogiri 1.6.8.1 with native extensions Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb checking if the C compiler accepts ... yes checking if the C compiler accepts -Wno-error=unused-command-line-argument-hard-error-in-future... no Building nokogiri using packaged libraries. Using mini_portile version 2.1.0 checking for iconv.h... yes checking for gzdopen() in -lz... yes checking for iconv... yes ************************************************************************ IMPORTANT NOTICE: Building Nokogiri with a packaged version of libxml2-2.9.4. Team Nokogiri will keep on doing their best to provide security updates in a timely manner, but if this is a concern for you and want to use the system library instead; abort this installation process and reinstall nokogiri as follows: gem install nokogiri -- --use-system-libraries [--with-xml2-config=/path/to/xml2-config] [--with-xslt-config=/path/to/xslt-config] If you are using Bundler, tell it to use the option: bundle config build.nokogiri --use-system-libraries bundle install Note, however, that nokogiri is not fully compatible with arbitrary versions of libxml2 provided by OS/package vendors. ************************************************************************ Extracting libxml2-2.9.4.tar.gz into tmp/x86_64-apple-darwin16/ports/libxml2/2.9.4... OK Running 'configure' for libxml2 2.9.4... OK Running 'compile' for libxml2 2.9.4... ERROR, review '/Library/Ruby/Gems/2.0.0/gems/nokogiri-1.6.8.1/ext/nokogiri/tmp/x86_64-apple-darwin16/ports/libxml2/2.9.4/compile.log' to see what happened. Last lines are: ======================================================================== unsigned short* in = (unsigned short*) inb; ^~~~~~~~~~~~~~~~~~~~~ encoding.c:815:27: warning: cast from 'unsigned char *' to 'unsigned short *' increases required alignment from 1 to 2 [-Wcast-align] unsigned short* out = (unsigned short*) outb; ^~~~~~~~~~~~~~~~~~~~~~ 4 warnings generated. CC error.lo CC parserInternals.lo CC parser.lo CC tree.lo CC hash.lo CC list.lo CC xmlIO.lo xmlIO.c:1450:52: error: use of undeclared identifier 'LZMA_OK' ret = (__libxml2_xzclose((xzFile) context) == LZMA_OK ) ? 0 : -1; ^ 1 error generated. make[2]: *** [xmlIO.lo] Error 1 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2 ======================================================================== *** 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=/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby --help --clean --use-system-libraries --enable-static --disable-static --with-zlib-dir --without-zlib-dir --with-zlib-include --without-zlib-include=${zlib-dir}/include --with-zlib-lib --without-zlib-lib=${zlib-dir}/lib --enable-cross-build --disable-cross-build /Library/Ruby/Gems/2.0.0/gems/mini_portile2-2.1.0/lib/mini_portile2/mini_portile.rb:366:in `block in execute': Failed to complete compile task (RuntimeError) from /Library/Ruby/Gems/2.0.0/gems/mini_portile2-2.1.0/lib/mini_portile2/mini_portile.rb:337:in `chdir' from /Library/Ruby/Gems/2.0.0/gems/mini_portile2-2.1.0/lib/mini_portile2/mini_portile.rb:337:in `execute' from /Library/Ruby/Gems/2.0.0/gems/mini_portile2-2.1.0/lib/mini_portile2/mini_portile.rb:111:in `compile' from /Library/Ruby/Gems/2.0.0/gems/mini_portile2-2.1.0/lib/mini_portile2/mini_portile.rb:150:in `cook' from extconf.rb:365:in `block (2 levels) in process_recipe' from extconf.rb:258:in `block in chdir_for_build' from extconf.rb:257:in `chdir' from extconf.rb:257:in `chdir_for_build' from extconf.rb:364:in `block in process_recipe' from extconf.rb:263:in `tap' from extconf.rb:263:in `process_recipe' from extconf.rb:556:in `<main>' Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/nokogiri-1.6.8.1 for inspection. Results logged to /Library/Ruby/Gems/2.0.0/gems/nokogiri-1.6.8.1/ext/nokogiri/gem_make.out Using rack-test 0.6.3 Using mime-types 3.1 Using binding_of_caller 0.7.2 Using coffee-script 2.4.1 Using uglifier 3.0.2 Using sprockets 3.7.0 An error occurred while installing sqlite3 (1.3.12), and Bundler cannot continue. Make sure that `gem install sqlite3 -v '1.3.12'` succeeds before bundling. run bundle exec spring binstub --all bundler: command not found: spring Install missing gem executables with `bundle install`
###助けてください
サーバーサイドの勉強を始めたのでずが初っ端からつまづいております。。
どなたかわかる方おられませんでしょうか。。
宜しくお願いします。
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。