RVM Ruby 1.9.1 install can't locate zlib but its runtime and dev library are there

Casper picture Casper · Mar 14, 2010 · Viewed 29k times · Source

Trying to get Ruby 1.9.1 up and running with RVM on a fresh install (fedora).

After doing rvm install 1.9.1, the rubygems error logs show that zlib can't be located

no such file to load -- zlib (LoadError)

However both the zlib runtime and development libraries are installed and up-to-date.

I'm kinda stumped on this one at the moment.

Answer

JasonOng picture JasonOng · May 11, 2010

Use rvm to install zlib

https://rvm.io/packages/zlib/

rvm package install zlib
rvm remove 1.9.1
rvm install 1.9.1 -C --with-zlib-dir=$rvm_path/usr

Edit: The rvm package command was renamed to rvm pkg in v1.6.25.