Reputation: 842
Having issue with making gem install to detect zlib.
I'm trying to install redis api for ruby. This needs zlib. Installed zlib through yum - sudo yum install zlib
. Installation is successful (as below).
[~]$ sudo yum install zlib
Loaded plugins: fastestmirror, langpacks, versionlock
Loading mirror speeds from cached hostfile
* base: server>.com
* epel: server>.com
* extras: <server>.com
* hp: server>.com
* updates: server>.com
Package zlib-1.2.7-17.el7.x86_64 already installed and latest version
Nothing to do
But, gem install redis
couldn't detect zlib. I get below error when installing redis api.
[~]$ sudo gem install redis
ERROR: Loading command: install (LoadError)
cannot load such file -- zlib
ERROR: While executing gem ... (NoMethodError)
undefined method `invoke_with_build_args' for nil:NilClass
Any reason why gem install couldn't detect the zlib?
Upvotes: 1
Views: 136
Reputation: 43855
I suspect you're missing the devel
package for zlib. rpm -qa | grep zlib
should produce output like the following:
# rpm -qa | grep zlib
zlib-devel-1.2.7-15.el7.x86_64
zlib-1.2.7-15.el7.x86_64
You'll want to include zlib-devel
and then try re-installing the redis gem. If this doesn't solve your issue, please include the output of gem install redis --verbose
in your question.
Upvotes: 1