- cannot load such file -- openssl
- cannot load such file -- zlib
You missed configure make to compile with those 2 libraries. Follow these steps to fix this issue.
- Remove the installed Ruby with make clean
- Install libssl-dev with your OS's package manager of choice. E.g. apt-get install libssl-dev
- Install zlib1g-dev with your OS's package manager of choice. E.g. apt-get install zlib1g-dev
- Config make file to include openssl by go to
ext/openssl and run ruby extconf.rb - Config make file to include zlib by go to
ext/zlib and run ruby extconf.rb - Go back to ruby source code directory run make && make install
- You should be able to successfully run gem install bundler
You can also do the same thing for readline. Install libreadline-dev and run extconf.rb in ext/readline
Tested with ruby 2.0.0p247
Credit:
4 comments:
Thank you. This worked liked a breeze!
Thank you.
worked like a charm .. thanks much!
hi,
It doesnt work for me I am getting same error after follow your steps.
mohsin@vw-ubuntu-android-01:/tmp/ruby/ruby-2.1.2$ gem install bundler
ERROR: Loading command: install (LoadError)
cannot load such file -- zlib
ERROR: While executing gem ... (NoMethodError)
undefined method `invoke_with_build_args' for nil:NilClass
Post a Comment