从 rbenv 卸载 ruby 版本
如何从 rbenv 卸载或删除 ruby 版本。我安装了两个版本的 ruby。当切换到 ruby 1.9.3 时,我遇到了分段错误。任何人都可以帮忙,如何从 rbenv 中删除特定版本?
How to uninstall or remove ruby version from rbenv. I have installed two versions of ruby. While switching to ruby 1.9.3, I am getting segmentation fault. Can anyone please help, how to remove a particular version from rbenv?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
新方法
使用
uninstall
命令:rbenv uninstall [-f|--force]
使用
rbenv versions
code> 查看您安装的版本。旧方法
要从 rbenv 中删除 Ruby 版本,请删除
~/.rbenv/versions
中的相应目录。例如,随后运行 rbenv rehash 来清理已删除版本中任何陈旧的填充二进制文件。
New way
Use the
uninstall
command:rbenv uninstall [-f|--force] <version>
Use
rbenv versions
to see which versions you have installed.Old way
To remove a Ruby version from rbenv, delete the corresponding directory in
~/.rbenv/versions
. E.g.Run
rbenv rehash
afterwards to clean up any stale shimmed binaries from the removed version.ruby-build 现在向 rbenv 添加了一个 卸载命令 来处理 ruby 版本的删除(如果您愿意的话)避免手动
rm -fr
(这可能被认为有风险)和 @Stephenson 建议的rbenv rehash
。要删除 ruby 版本 1.9.3-p0,您将运行以下命令:ruby-build now adds an uninstall command to rbenv to handle the removal of ruby versions, if you want to avoid manual
rm -fr
(which might be considered risky) andrbenv rehash
suggested by @Stephenson. For removing ruby version 1.9.3-p0 you would run the following:就像史蒂芬森说的,但记得改变版本&如果它们引用已删除的版本,则为全局。
Like Stephenson said, but remember to change version & global if they are referencing the deleted version.
正确的命令在其他答案中有很好的解释,但是如果您尝试卸载 jruby,那么您需要在命令中显式提及
jruby
,后跟连字符,然后是 gem 版本,例如:rbenv uninstall jruby-9.2.16.0
The correct command is well explained in other answers, However if you are trying to uninstall jruby then you need to explicitly mention
jruby
in command followed by hyphen and then gem version, For example:rbenv uninstall jruby-9.2.16.0