Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby/20.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby Can';“t运行”;创业板名单;!_Ruby_Ubuntu_Gem_Zlib_Rvm - Fatal编程技术网

Ruby Can';“t运行”;创业板名单;!

Ruby Can';“t运行”;创业板名单;!,ruby,ubuntu,gem,zlib,rvm,Ruby,Ubuntu,Gem,Zlib,Rvm,我在运行时出错: vagrant@vagrantup:~$ 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

我在运行时出错:

vagrant@vagrantup:~$ 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库:

vagrant@vagrantup:~$ 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
我正在使用,错误发生在我安装rvm之后


可能是什么问题?

Ruby是如何安装的?如果Ruby是在没有zlib支持的情况下安装的,那就是问题所在


你可以阅读我关于在Ubuntu上安装RVM的文章。在编译Ruby之前,必须同时安装zlib和zlib开发包(以及Ubuntu中的一些其他包)。你可能只需要安装它们并重新编译Ruby。

在Ubuntu 10.10中也有同样的问题,而公认的答案对我没有帮助。