Error Installing Gems: Cannot Load Such File - Zlib

Error installing gems: cannot load such file -- zlib

The following worked for me:

brew install homebrew/dupes/zlib
rvm reinstall 2.2.2 --with-zlib-dir=/usr/local/Cellar/zlib/1.2.8

Hope this helps anyone else who runs into it.

cannot load such file -- zlib even after using rvm pkg install zlib

I ended up installing zlib from apt-get and then reinstalling ruby to not use the rvm directory for zlib.

Here's how do:

$ sudo apt-get install zlib1g-dev
$ rvm reinstall 1.9.3

[Edit] As commenter @chrisfinne mentions, on CentOS/RedHat based systems:

$ sudo yum install zlib-devel
$ rvm reinstall 1.9.3

Error in ruby: cannot load such file -- zlib

You should not install readline / zlib on ubuntu, follow this steps:

rvm get head
rvm pkg remove
rvm requirements run force
rvm reinstall 1.9.3-p374

make sure to include output of the installation process if this fails, also include all mentioned log files

How to fix zlib error in ruby?

Thanks to all of you, My problem solved via this:

aptitude purge ruby

I hope you will find this command useful.



Related Topics



Leave a reply



Submit