2010-08-26 75 views
2

我得到一个错误,当我运行:无法运行“宝石列表”!

[email protected]:~$ sudo gem list 
ERROR: Loading command: list (LoadError) 
    no such file to load -- zlib 
ERROR: While executing gem ... (NameError) 
    uninitialized constant Gem::Commands::ListCommand 

即使我不使用sudo,我得到了同样的错误消息。

这是在Ubuntu 10.4,我已经安装的zlib库:

[email protected]:~$ sudo aptitude search zlib 
p gambas2-gb-compress-bzlib2             - The Gambas bzlib2 component                
p gambas2-gb-compress-zlib              - The Gambas zlib compression component             
p haskell-zlib-doc                - Compression and decompression in the gzip and zlib formats; documentation    
p libcompress-raw-zlib-perl              - low-level interface to zlib compression library           
p libcompress-zlib-perl               - Transitional dummy package for Compress::Zlib           
i libghc6-zlib-dev                - Compression and decompression in the gzip and zlib formats        
v libghc6-zlib-dev-0.5.2.0-d3bd7            -                       
v libghc6-zlib-doc                -                       
p libghc6-zlib-prof                - Compression and decompression in the gzip and zlib formats; profiling libraries   
v libghc6-zlib-prof-0.5.2.0-d3bd7            -                       
p libio-compress-zlib-perl              - Transitional dummy package for IO::Compress::Zlib          
p libio-zlib-perl                - IO:: style interface to gzip/zlib compressed files/handles        
p libjzlib-java                 - reimplementation of zlib in pure Java             
i libzlib-ruby                 - transitional dummy package                
v libzlib-ruby1.8                -                       
p zlib-bin                  - compression library - sample programs             
i zlib1g                  - compression library - runtime               
p zlib1g-dbg                 - compression library - development              
i zlib1g-dev                 - compression library - development              
i zlibc                   - An on-fly auto-uncompressing C library 

进出口使用http://www.vagrantup.com和我已经安装了RVM后的错误出现。

问题是什么?

+0

在Ubuntu 10.10中遇到同样的问题,并且接受的答案对我没有帮助。 – 2011-01-22 20:18:35

回答

3

Ruby是如何安装的?如果Ruby没有安装zlib,那就是问题所在。

你可以阅读我的文章here在Ubuntu上安装RVM。在编译Ruby之前必须安装zlib和zlib-dev软件包(以及来自Ubuntu的其他软件包)。你可能只需要安装这些并重新编译Ruby。