部署 在 Ubuntu 下 按照 wiki 里步骤安装 出现这个错误了?

123clb · 2012年04月28日 · 最后由 lgn21st 回复于 2012年04月28日 · 2919 次阅读

在 Ubuntu 下 按照 wiki 里步骤安装 出现这个后就安装不下去了

admini@123clb:~$ ruby -v ruby 1.9.2p320 (2012-04-20 revision 35421) [i686-linux] admini@123clb:~$ gem -v 1.8.23 admini@123clb:~$ gem source -r http://rubygems.org/ source http://rubygems.org/ not present in cache

admini@123clb:~$ gem source -a http://ruby.taobao.org /home/admini/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in require': no such file to load -- zlib (LoadError) from /home/admini/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:inrequire' from /home/admini/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems.rb:540:in gunzip' from /home/admini/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/remote_fetcher.rb:239:infetch_path' from /home/admini/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/spec_fetcher.rb:269:in load_specs' from /home/admini/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/commands/sources_command.rb:72:inexecute' from /home/admini/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/command.rb:278:in invoke' from /home/admini/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/command_manager.rb:147:inprocess_args' from /home/admini/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/command_manager.rb:117:in run' from /home/admini/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/gem_runner.rb:65:inrun' from /home/admini/.rvm/rubies/ruby-1.9.2-p320/bin/gem:25:in `

' admini@123clb:~$ gem install bundler rails ERROR: Loading command: install (LoadError) no such file to load -- zlib ERROR: While executing gem ... (NameError) uninitialized constant Gem::Commands::InstallCommand

大家帮忙给看下,折腾一个晚上了.

no such file to load -- zlib,装个 zlib 看看

你用了 RVM 了么?如果用了 RVM,那么执行 rvm requirements 你会看到用 RVM 装 Ruby 之前,需要通过apt-get安装的一些依赖包信息,楼主试试看把这些依赖包都装上在试试看行不行?

需要 登录 后方可回复, 如果你还没有账号请点击这里 注册