首页 文章

gem install sqlite3有效,bundle install不行?

提问于
浏览
1
root@localhost:~# which ruby
/usr/local/bin/ruby
root@localhost:~# which gem
/usr/local/bin/gem
root@localhost:~# ruby -v
ruby 1.9.2p180 (2011-02-18 revision 30909) [i686-linux]
root@localhost:~# gem -v
1.7.2
root@localhost:~# 

root@localhost:~# gem install bundler
Successfully installed bundler-1.0.12
1 gem installed
......

root@localhost:~/www/blog# bundle install
Fetching source index for http://rubygems.org/
......

使用本机扩展安装sqlite3(1.3.3)/usr/local/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:533:在build_extensions中的“rescue in block”中:错误:无法构建gem native延期 . (Gem :: Installer :: ExtensionBuildError)/ usr / local / bin / ruby extconf.rb
Gem文件将保留在/root/www/blog/vendor/bundle/ruby/1.9.1/gems/sqlite3-1.3.3中进行检查 . 结果从/usr/local/lib/ruby/site_ruby/1.9.1记录到/root/www/blog/vendor/bundle/ruby/1.9.1/gems/sqlite3-1.3.3/ext/sqlite3/gem_make.out /rubygems/installer.rb:511:来自/usr/local/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:486:,来自/ usr / local / lib / ruby的build_extensions'中的块/site_ruby/1.9.1/rubygems/installer.rb:486:in build_extensions'来自/usr/local/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:159:in install'来自/ usr / local /lib/ruby/gems/1.9.1/gems/bundler-1.0.12/lib/bundler/source.rb:96:in install'来自/usr/local/lib/ruby/gems/1.9.1/gems/ bundler-1.0.12 / lib / bundler / installer.rb:55:inblock in run'from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/lib/bundler/spec_set . rb:12:在/ usr /中每个'来自/usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/lib/bundler/spec_set.rb:12:in'块中local / lib / ruby / gems / 1.9.1 / gems / bundler-1.0.12 / lib / bundler / spec_set.rb:12:in each from fromus/local/lib/ruby/gems/1.9.1/gems /bundler-1.0.12/lib/bundler/installer.rb :44:inrun'来自/usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/lib/bundler/installer.rb:8:in install'来自/ usr / local / lib / ruby / gems / 1.9.1 / gems / bundler-1.0.12 / lib / bundler / cli.rb:225:in install'from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0 .12 / lib / bundler / vendor / thor / task.rb:22:in run'from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/lib/bundler/vendor/ thor / invocation.rb:118:来自/usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/lib/bundler/vendor/thor.rb:246:in dispatch'中的invoke_task'来自/usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/lib/bundler/vendor/thor/base.rb:389:in start'from / usr / local / lib / ruby /gems/1.9.1/gems/bundler-1.0.12/bin/bundle:13:in <top(required)>'from / usr / local / bin / bundle:19:inload'from / usr / local / bin / bundle:19:in''

2 回答

  • 0

    libsqlite3-0和libsqlite3-dev都是sqlite3-ruby gem所必需的 . 要解决Ubuntu上可能遇到的OpenSSL,nokogiri和SQLite3可能遇到的问题,请运行以下命令(写在一行):

    sudo aptitude install build-essential bison openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf
    
  • 1

    试试这里讨论的解决方案:sqlite3-ruby install error on Ubuntu

相关问题