与えられたGemfileからbundle installをしたところ以下のエラーメッセージ1が発生しました。
エラーメッセージ1からgem install sqlite3 -v '1.3.8'するよう書いてあるためgem install sqlite3 -v '1.3.8'を行ったところエラーメッセージ2になりました。
知識不足で申し訳ないのですが、解決策をお教えいただければ幸いです。
###発生している問題・エラーメッセージ1
Gem::Ext::BuildError: ERROR: Failed to build gem native extension. current directory: /Users/Takahiro/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/sqlite3-1.3.8/ext/sqlite3 /Users/Takahiro/.rbenv/versions/2.3.1/bin/ruby -r ./siteconf20161127-37682-3mbd8o.rb extconf.rb checking for sqlite3.h... yes checking for sqlite3_libversion_number() in -lsqlite3... yes checking for rb_proc_arity()... yes checking for sqlite3_initialize()... yes checking for sqlite3_backup_init()... yes checking for sqlite3_column_database_name()... no checking for sqlite3_enable_load_extension()... no checking for sqlite3_load_extension()... no checking for sqlite3_open_v2()... yes checking for sqlite3_prepare_v2()... yes checking for sqlite3_int64 in sqlite3.h... yes checking for sqlite3_uint64 in sqlite3.h... yes creating Makefile To see why this extension failed to compile, please check the mkmf.log which can be found here: /Users/Takahiro/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/extensions/x86_64-darwin-15/2.3.0-static/sqlite3-1.3.8/mkmf.log current directory: /Users/Takahiro/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/sqlite3-1.3.8/ext/sqlite3 make "DESTDIR=" clean current directory: /Users/Takahiro/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/sqlite3-1.3.8/ext/sqlite3 make "DESTDIR=" compiling backup.c compiling database.c compiling exception.c compiling sqlite3.c compiling statement.c statement.c:261:11: warning: implicit declaration of function 'RBIGNUM' is invalid in C99 [-Wimplicit-function-declaration] if (RBIGNUM_LEN(value) * SIZEOF_BDIGITS <= 8) { ^ ./sqlite3_ruby.h:16:24: note: expanded from macro 'RBIGNUM_LEN' #define RBIGNUM_LEN(x) RBIGNUM(x)->len ^ statement.c:261:11: error: member reference type 'int' is not a pointer if (RBIGNUM_LEN(value) * SIZEOF_BDIGITS <= 8) { ^~~~~~~~~~~~~~~~~~ ./sqlite3_ruby.h:16:36: note: expanded from macro 'RBIGNUM_LEN' #define RBIGNUM_LEN(x) RBIGNUM(x)->len ~~~~~~~~~~ ^ statement.c:261:32: error: use of undeclared identifier 'SIZEOF_BDIGITS' if (RBIGNUM_LEN(value) * SIZEOF_BDIGITS <= 8) { ^ 1 warning and 2 errors generated. make: *** [statement.o] Error 1 make failed, exit code 2 Gem files will remain installed in /Users/Takahiro/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/sqlite3-1.3.8 for inspection. Results logged to /Users/Takahiro/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/extensions/x86_64-darwin-15/2.3.0-static/sqlite3-1.3.8/gem_make.out An error occurred while installing sqlite3 (1.3.8), and Bundler cannot continue. Make sure that `gem install sqlite3 -v '1.3.8'` succeeds before bundling.
###発生している問題・エラーメッセージ2
Building native extensions. This could take a while... ERROR: Error installing sqlite3: ERROR: Failed to build gem native extension. current directory: /Users/Takahiro/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/sqlite3-1.3.8/ext/sqlite3 /Users/Takahiro/.rbenv/versions/2.3.1/bin/ruby -r ./siteconf20161127-41731-1pc2nfg.rb extconf.rb checking for sqlite3.h... yes checking for sqlite3_libversion_number() in -lsqlite3... yes checking for rb_proc_arity()... yes checking for sqlite3_initialize()... yes checking for sqlite3_backup_init()... yes checking for sqlite3_column_database_name()... no checking for sqlite3_enable_load_extension()... no checking for sqlite3_load_extension()... no checking for sqlite3_open_v2()... yes checking for sqlite3_prepare_v2()... yes checking for sqlite3_int64 in sqlite3.h... yes checking for sqlite3_uint64 in sqlite3.h... yes creating Makefile To see why this extension failed to compile, please check the mkmf.log which can be found here: /Users/Takahiro/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/extensions/x86_64-darwin-15/2.3.0-static/sqlite3-1.3.8/mkmf.log current directory: /Users/Takahiro/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/sqlite3-1.3.8/ext/sqlite3 make "DESTDIR=" clean current directory: /Users/Takahiro/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/sqlite3-1.3.8/ext/sqlite3 make "DESTDIR=" compiling backup.c compiling database.c compiling exception.c compiling sqlite3.c compiling statement.c statement.c:261:11: warning: implicit declaration of function 'RBIGNUM' is invalid in C99 [-Wimplicit-function-declaration] if (RBIGNUM_LEN(value) * SIZEOF_BDIGITS <= 8) { ^ ./sqlite3_ruby.h:16:24: note: expanded from macro 'RBIGNUM_LEN' #define RBIGNUM_LEN(x) RBIGNUM(x)->len ^ statement.c:261:11: error: member reference type 'int' is not a pointer if (RBIGNUM_LEN(value) * SIZEOF_BDIGITS <= 8) { ^~~~~~~~~~~~~~~~~~ ./sqlite3_ruby.h:16:36: note: expanded from macro 'RBIGNUM_LEN' #define RBIGNUM_LEN(x) RBIGNUM(x)->len ~~~~~~~~~~ ^ statement.c:261:32: error: use of undeclared identifier 'SIZEOF_BDIGITS' if (RBIGNUM_LEN(value) * SIZEOF_BDIGITS <= 8) { ^ 1 warning and 2 errors generated. make: *** [statement.o] Error 1 make failed, exit code 2 Gem files will remain installed in /Users/Takahiro/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/sqlite3-1.3.8 for inspection. Results logged to /Users/Takahiro/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/extensions/x86_64-darwin-15/2.3.0-static/sqlite3-1.3.8/gem_make.out
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2016/11/27 04:10