简体   繁体   中英

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

I am currently using ubuntu 11.10. I just now installed rvm and ruby 1.9.2. When I try to install rails I get the following error

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.

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

After a little research I found this link that I consider to be more useful for your case.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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