在 OpenSUSE 上卸载 Ruby(zlib 错误)
我是 Linux 和 Ruby 新手。我一直在寻找答案,但没有结果。
使用 OpenSUSE 11.1
我最近下载了最新的 Ruby 1.9.2 并使用从源代码进行安装的方法。那时我还没有 zlib。
现在,我无法使用命令“gem -d list ruby”。该错误表明没有要加载的文件 - zlib。我想从系统中完全删除 Ruby 和 RubyGem。
我尝试使用 RVM,但我不知道如何使用。多年来一直尝试安装它,但它仍然没用,因为即使我添加了“[[ - s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # 这会将 RVM 加载到 .bash_profile 和.bashrc。
整个晚上都在努力。任何帮助表示赞赏。提前致谢。 :)
I am new to Linux and Ruby. I have been searching for an answer but to no avail.
Using OpenSUSE 11.1
I recently downloaded the latest Ruby 1.9.2 and use the method make install from the source. I did not have the zlib back then.
Now, I cannot use the command "gem -d list ruby". The error says no such file to load -- zlib. I wanted to remove Ruby and RubyGem entirely from the system.
I tried using RVM but i couldn't figure it out on how to use. Been trying to install it for ages, but it is still useless, as the "type rvm | head -n1" comes out to rvm is hashed (usr/local/rvm/bin/rvm) even though I added the "[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # This loads RVM into a shell session" to both .bash_profile and .bashrc.
Been working on it whole night. Any help is appreciated. Thanks in advance. :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我遇到了完全相同的问题,使用 RVM 在 openSUSE 11.4 上安装了 Ruby 1.9.2。这是 openSUSE 的全新安装,我试图设置 Rails 开发环境。
为了解决这个问题,我使用以下命令删除了 1.9.2 实例:
然后,我使用以下命令安装了 zlib-devel 和 openssl:
然后,我必须从 rvm 的 src 文件夹中删除 1.9.2 源文件。可以在 ~/.rvm/src 下找到
ruby 1.9.2、rubygems 和 yaml 的源代码。我删除了所有三个,将 ~/.rvm/src/rvm 文件夹留在那里,以防 rvm 需要。
最后,我使用以下命令重新安装了 ruby 1.9.2:
Gems 之后工作了,我能够执行 gem update --system 和 gem install Rails。
我希望这有帮助。我认为这是一个古老的、悬而未决的问题。
麦克风
I had the exact same issue, installed Ruby 1.9.2 on openSUSE 11.4 using RVM. This was a clean install of openSUSE and I was trying to get a Rails development environment set up.
To address this, I removed my 1.9.2 instance using:
Then, I installed zlib-devel and openssl using:
I then had to delete the 1.9.2 source files from rvm's src folder. This can be found under ~/.rvm/src
The source was there for ruby 1.9.2, rubygems, and yaml. I removed all three, leaving the ~/.rvm/src/rvm folder there in case it was needed by rvm.
Lastly, I re-installed ruby 1.9.2 using:
Gems worked after that and I was able to do a gem update --system and gem install rails.
I hope this helps. I see this is an old, outstanding issue.
Mike