$ bundle install:无法构建gem原生扩展

Rew*_*bie 6 ruby-on-rails

使用Snow leopard,Rails 3.0.3,ruby 1.9.2p0和RVM.当我尝试安装捆绑包时,我得到:

[first_app]$ bundle install
Fetching source index for http://rubygems.org/
Using rake (0.8.7) 
Using abstract (1.0.0) 
Using activesupport (3.0.3) 
Using builder (2.1.2) 
Using i18n (0.5.0) 
Using activemodel (3.0.3) 
Using erubis (2.6.6) 
Using rack (1.2.1) 
Using rack-mount (0.6.13) 
Using rack-test (0.5.7) 
Using tzinfo (0.3.24) 
Using actionpack (3.0.3) 
Using mime-types (1.16) 
Using polyglot (0.3.1) 
Using treetop (1.4.9) 
Using mail (2.2.14) 
Using actionmailer (3.0.3) 
Using arel (2.0.7) 
Using activerecord (3.0.3) 
Using activeresource (3.0.3) 
Using bundler (1.0.7) 
Using thor (0.14.6) 
Using railties (3.0.3) 
Using rails (3.0.3) 
Installing sqlite3 (1.3.3) with native extensions /Users/dawson/.rvm/rubies/ruby-1.9.2-p

0/lib/ruby/1.9.1/rubygems/installer.rb:483:in `rescue in block in build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)
/Users/dawson/.rvm/rubies/ruby-1.9.2-p0/bin/ruby extconf.rb 
checking for sqlite3.h... *** 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.
Run Code Online (Sandbox Code Playgroud)

Dim*_*ris 5

您缺少系统上与sqlite相关的库.这是依赖于应安装在您的计算机上的库的宝石的常见问题.尝试安装libsqlite3-dev.