简体   繁体   English

无法在ubuntu 11.10中安装rails。 [Zlib错误]

[英]Unable to install rails in ubuntu 11.10. [Zlib error]

I am currently using ubuntu 11.10. 我目前正在使用ubuntu 11.10。 I just now installed rvm and ruby 1.9.2. 我刚刚安装了rvm和ruby 1.9.2。 When I try to install rails I get the following error 当我尝试安装rails时,出现以下错误

ERROR:  Loading command: install (LoadError)
    no such file to load -- zlib
ERROR:  While executing gem ... (NameError)
    uninitialized constant Gem::Commands::InstallCommand

I tried installing zlib library in many ways but I still get this error and couldn't proceed further. 我尝试在很多方面安装zlib库,但我仍然遇到此错误,无法继续进行。

Do the following: 请执行下列操作:

 1. install zlib devel (sudo apt-get install zlib1g-dev )
 2. cd /path_to_your_ruby_install_directory
 3. cd ext/zlib/
 4. ruby extconf.rb
 5. make
 6. make install

After that try to install rails again 之后尝试再次安装rails

After a little research I found this link that I consider to be more useful for your case. 经过一番研究后,我发现这个链接对我的案例更有用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM