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

前端 未结 6 2041
臣服心动
臣服心动 2020-11-29 00:19

I installed zlib package and ruby 1.9.3 using rvm, but whenever I try to install gems it says cannot load such file -- zlib

The commands I used to insta

6条回答
  •  悲&欢浪女
    2020-11-29 00:33

    Ruby has a bunch of package dependencies like the one on zlib-devel. They're nasty because there's nothing to indicate you need the library until get some obscure error message while trying to do something routine.

    The solution is to use rvm. Use it even if you only need one version of ruby. Why? Because then you can do

    rvm requirements
    

    This will probe your particular OS and produce a set of commands you can copy back to the command line to install those missing packages.

提交回复
热议问题