问题描述
我使用rvm安装了zlib软件包和ruby 1.9.3,但是每当我尝试安装 我用来安装的命令是 所有关于此的帮助主题告诉我只要执行 我结束了从apt-get安装zlib,然后重新安装ruby到 not 使用rlm的rvm目录。 这是如何做的: b I installed zlib package and ruby 1.9.3 using rvm, but whenever I try to installgems it says The commands I used to install are All the help on this subject tells me to just do I ended up installing zlib from apt-get and then reinstalling ruby to not use the rvm directory for zlib. Here's how do: [Edit] As commenter @chrisfinne mentions, on CentOS/RedHat based systems: 这篇关于即使在使用rvm pkg install zlib之后,也无法加载这样的文件 - zlib的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
gems时,都会说
无法加载这样的文件 - zlib $ c $
$ rvm安装1.9.3
$ rvm pkg安装zlib
$ rvm重新安装1.9.3 --with-readline-dir = / home / username / .rvm / usr \
--with-iconv-dir = / home / username / .rvm / usr \\ \\
--with-zlib-dir = / home / username / .rvm / usr \
--with-openssl-dir = / home / username / .rvm / usr
$ rvm使用1.9.3
$ gem install heroku
错误:加载命令:install(LoadError)
无法加载此类文件 - zlib
ERROR :执行gem ...(NameError)
未初始化的常量Gem :: Commands :: InstallCommand
rvm pkg install zlib
和
,然后使用重新安装ruby - with-zlib-dir = / home / U sername / .rvm / usr
,但是这个
没有工作。
$ sudo apt-get install zlib1g-dev
$ rvm重新安装1.9.3
$ c $作为评论者@chrisfinne在CentOS / RedHat系统上提到:
$ sudo yum install zlib-devel
$ rvm重新安装1.9.3
cannot load such file -- zlib
$ rvm install 1.9.3
$ rvm pkg install zlib
$ rvm reinstall 1.9.3 --with-readline-dir=/home/username/.rvm/usr \
--with-iconv-dir=/home/username/.rvm/usr \
--with-zlib-dir=/home/username/.rvm/usr \
--with-openssl-dir=/home/username/.rvm/usr
$ rvm use 1.9.3
$ gem install heroku
ERROR: Loading command: install (LoadError)
cannot load such file -- zlib
ERROR: While executing gem ... (NameError)
uninitialized constant Gem::Commands::InstallCommand
rvm pkg install zlib
, andthen reinstall the ruby with --with-zlib-dir=/home/username/.rvm/usr
, but thisdidn't work.$ sudo apt-get install zlib1g-dev
$ rvm reinstall 1.9.3
$ sudo yum install zlib-devel
$ rvm reinstall 1.9.3