开发者

error installing sqlite3 gem on leopard 10.6.7 with xcode 3.2.6

开发者 https://www.devze.com 2023-03-14 14:36 出处:网络
I tried to do install gem sqlite3 with sudo gem install sqlite3 I then got the error below. does anyone have any idea?

I tried to do install gem sqlite3 with sudo gem install sqlite3 I then got the error below. does anyone have any idea?

My environment is:

  RubyGems Environment:
  - RUBYGEMS VERSION: 1.8.5
  - RUBY VERSION: 1.9.2 (2010-08-18 patchlevel 0) [x86_64-darwin10.4.0]
  - INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/1.9.1
  - RUBY EXECUTABLE: /usr/local/bin/ruby
  - EXECUTABLE DIRECTORY: /usr/local/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86_64-darwin-10
  - GEM PATHS:
     - /usr/local/lib/ruby/gems/1.9.1
     - /Users/renkevin/.gem/ruby/1.9.1
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - http://rubygems.org/

sudo gem install sqlite3

Building native extensions.  This could take a while...
ERROR:  Error installing sqlite3:
    ERROR: Failed to build gem native extension.
        /usr/local/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.
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=/usr/local/bin/ruby
    --with-sqlite3-dir
    --without-sqlite3-dir
    --with-sqlite3-include
    --without-sqlite3-include=${sqlite3-dir}/include
    --with-sqlite3-lib
    --without-sqlite3-lib=${sqlite3-dir}/lib
/usr/local/lib/ruby/1.9.1/mkmf.rb:368:in `try_do': The complier failed to generate an executable file. (RuntimeError)
You have to install development tools first.
    from /usr/local/lib/ruby/1.9.1/mkmf.rb:452:in `try_cpp'
    from /usr/local/lib/ruby/1.9.1/mkmf.rb:853:in `block in find_header'
    from /usr/local/lib/ruby/1.9.1/mkmf.rb:693:in `block in checking_for'
    from /usr/local/lib/ruby/1.9.1/mkmf.rb:280:in `block (2 levels) in postpone'
    from /usr/local/lib/ruby/1.9.1/mkmf.rb:254:in开发者_Python百科 `open'
    from /usr/local/lib/ruby/1.9.1/mkmf.rb:280:in `block in postpone'
    from /usr/local/lib/ruby/1.9.1/mkmf.rb:254:in `open'
    from /usr/local/lib/ruby/1.9.1/mkmf.rb:276:in `postpone'
    from /usr/local/lib/ruby/1.9.1/mkmf.rb:692:in `checking_for'
    from /usr/local/lib/ruby/1.9.1/mkmf.rb:852:in `find_header'
    from extconf.rb:28:in `<main>'


I just resolved it by reinstalling the Developer tools. Not sure what exactly went wrong!

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号