2010-08-26 27 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。