简体   繁体   English

我无法在mac osx 10.8.2上安装sqlite3 gem

[英]I can't install the sqlite3 gem on mac osx 10.8.2

My bundle install is not working and I get this error: 我的bundle install不起作用,我收到此错误:

Installing sqlite3 (1.3.6) with native extensions 
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

    /Users/Frank/.rvm/rubies/ruby-1.9.3-p327/bin/ruby extconf.rb --with-sqlite3-       include=/Users/Frank/include --with-sqlite3-lib=/Users/Frank/lib --with-sqlite3-dir=/Users/Frank/bin
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

Which I think it has to do with the libsql-dev thats not working. 我认为这与libsql-dev无关。 but then I get this 但后来我明白了

make
compiling backup.c
In file included from ./sqlite3_ruby.h:51,
             from backup.c:3:
./backup.h:7: error: expected specifier-qualifier-list before ‘sqlite3_backup’
backup.c: In function ‘initialize’:
backup.c:63: error: ‘sqlite3_backup’ undeclared (first use in this function)
backup.c:63: error: (Each undeclared identifier is reported only once
backup.c:63: error: for each function it appears in.)
backup.c:63: error: ‘pBackup’ undeclared (first use in this function)
backup.c:77: error: ‘sqlite3BackupRuby’ has no member named ‘p’
backup.c: In function ‘step’:
backup.c:101: error: ‘sqlite3BackupRuby’ has no member named ‘p’
backup.c:102: error: ‘sqlite3BackupRuby’ has no member named ‘p’
backup.c: In function ‘finish’:
backup.c:115: error: ‘sqlite3BackupRuby’ has no member named ‘p’
backup.c:116: error: ‘sqlite3BackupRuby’ has no member named ‘p’
backup.c:117: error: ‘sqlite3BackupRuby’ has no member named ‘p’
backup.c: In function ‘remaining’:
backup.c:133: error: ‘sqlite3BackupRuby’ has no member named ‘p’
backup.c:134: error: ‘sqlite3BackupRuby’ has no member named ‘p’
backup.c: In function ‘pagecount’:
backup.c:149: error: ‘sqlite3BackupRuby’ has no member named ‘p’
backup.c:150: error: ‘sqlite3BackupRuby’ has no member named ‘p’
make: *** [backup.o] Error 1


Gem files will remain installed in /Users/Frank/gems/gems/sqlite3-1.3.6 for inspection.
Results logged to /Users/Frank/gems/gems/sqlite3-1.3.6/ext/sqlite3/gem_make.out

An error occurred while installing sqlite3 (1.3.6), and Bundler cannot continue.
Make sure that `gem install sqlite3 -v '1.3.6'` succeeds before bundling.

I started getting it randmoly today and I can't run my rails apps without it. 我今天开始得到randmoly,如果没有它我就无法运行我的rails应用程序。 What can I do? 我能做什么?

Was having this issue recently. 最近有这个问题。 Had to open up the XCode tools and accept the terms of service. 不得不打开XCode工具并接受服务条款。 Then everything worked fine. 一切都很好。 (Make sure you have XCode installed first) (确保先安装XCode)

Himanshu's link fixed my problem. Himanshu的链接解决了我的问题。

https://github.com/luislavena/sqlite3-ruby/issues/20 https://github.com/luislavena/sqlite3-ruby/issues/20

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM