0
我从源代码安装了Ruby v2.1.4。与缺失库相关的Gem安装错误
yum install gcc g++ make automake autoconf curl-devel openssl-devel zlib-devel httpd-devel apr-devel apr-util-devel sqlite-devel
所有成功:我使用安装了所有必要的libaries。
现在,当我想安装一个宝石有:
gem install bundler-1.7.4.gem
我得到:
ERROR: Loading command: install (LoadError)
cannot load such file -- zlib
ERROR: While executing gem ... (NoMethodError)
undefined method `invoke_with_build_args' for nil:NilClass
我相信,zlib的安装:
locate zlib
导致长清单
/lib/modules/2.6.32-431.el6.x86_64/kernel/crypto/zlib.ko
/lib/modules/2.6.32-431.el6.x86_64/kernel/lib/zlib_deflate
/lib/modules/2.6.32-431.el6.x86_64/kernel/lib/zlib_deflate/zlib_deflate.ko
/lib64/rsyslog/lmzlibw.so
/usr/include/zlib.h
/usr/lib64/pkgconfig/zlib.pc
/usr/lib64/python2.6/encodings/zlib_codec.py
/usr/lib64/python2.6/encodings/zlib_codec.pyc
/usr/lib64/python2.6/encodings/zlib_codec.pyo
/usr/lib64/python2.6/lib-dynload/zlibmodule.so
/usr/local/share/doc/ruby/capi/html/db/d74/zlib_8c.html
/usr/local/share/doc/ruby/capi/html/db/d74/zlib_8c_source.html
/usr/local/share/ri/2.1.0/system/Zlib/zlib_version-c.ri
/usr/share/doc/zlib-1.2.3
/usr/share/doc/zlib-devel-1.2.3
/usr/share/doc/zlib-1.2.3/ChangeLog
/usr/share/doc/zlib-1.2.3/FAQ
/usr/share/doc/zlib-1.2.3/README
/usr/share/doc/zlib-devel-1.2.3/README
/usr/share/doc/zlib-devel-1.2.3/algorithm.txt
/usr/share/doc/zlib-devel-1.2.3/example.c
/usr/share/doc/zlib-devel-1.2.3/minigzip.c
/usr/share/man/man3/zlib.3.gz
/usr/src/kernels/2.6.32-431.el6.x86_64/include/config/zlib
/usr/src/kernels/2.6.32-431.el6.x86_64/include/config/crypto/zlib.h
/usr/src/kernels/2.6.32-431.el6.x86_64/include/config/jffs2/zlib.h
/usr/src/kernels/2.6.32-431.el6.x86_64/include/config/ubifs/fs/zlib.h
/usr/src/kernels/2.6.32-431.el6.x86_64/include/config/zlib/deflate.h
/usr/src/kernels/2.6.32-431.el6.x86_64/include/config/zlib/inflate.h
/usr/src/kernels/2.6.32-431.el6.x86_64/include/linux/zlib.h
/usr/src/kernels/2.6.32-431.el6.x86_64/lib/zlib_deflate
/usr/src/kernels/2.6.32-431.el6.x86_64/lib/zlib_inflate
/usr/src/kernels/2.6.32-431.el6.x86_64/lib/zlib_deflate/Makefile
/usr/src/kernels/2.6.32-431.el6.x86_64/lib/zlib_inflate/Makefile
我错过了什么吗?
可能重复[无法加载这样的文件--zlib甚至使用rvm pkg install zlib后](http://stackoverflow.com/questions/9727908/cann ot-load-such-file-zlib-even-after-using-rvm-pkg-install-zlib),具体来说这个评论:http://stackoverflow.com/questions/9727908/cannot-load-such-file-zlib -even-after-using-rvm-pkg-install-zlib#comment-15076165 – 2014-12-09 12:35:15
@PatrickOscity只要它实际上可以复制它的另一种情况,因为我无法在我的CentOS上使用Internet连接,所以每次使用rvm都会尝试FALE。不过,我确实设法通过http://visibletrap.blogspot.com/2013/10/installing-ruby-cannot-load-such-file.html – Mithrand1r 2014-12-09 13:26:20
中的步骤顺便完成。请添加该答案并尽快接受您自己的答案。这可能有助于未来的游客。谢谢! – 2014-12-09 13:37:51