WSL 2 Ubuntu cannot load such file -- zlib

46 views Asked by At

I just got an old project. But when I run bundle install command from the guide, I got this error.

irwan@LAPTOP-3KM80MDK:~$ gem install bundler:1.9.0 
ERROR:  Loading command: install (LoadError)
cannot load such file -- zlib ERROR:  While executing gem ... (NoMethodError)
undefined method `invoke_with_build_args' for nil:NilClass

I already run

sudo apt install zlib1g-dev

But I still the same error. I feel like the installation path is not correct, but I am not sure how to check it.

1

There are 1 answers

0
Irwan On

I fixed it by doing this:

sudo apt install zlib1g-dev

and then

rbenv uninstall 2.3.3
rbenv install 2.3.3

I need to reinstall the 2.3.3