如何在macOS上卸载rbenv? [英] How do you uninstall rbenv on macOS?

查看:662
本文介绍了如何在macOS上卸载rbenv?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在macOS上卸载rbenv?我的rbenv版本搞砸了,brew uninstall rbenv无法正常工作,因为brew依赖于ruby.

How do you uninstall rbenv on macOS? My version of rbenv is messed up, and brew uninstall rbenv isn't working because brew relies on ruby.

推荐答案

我采取了以下步骤,在运行El Capitan(10.11.4)的Mac上成功摆脱了rbenv.根据我的经验,Rbenv是Failed to build gem native extension errors的主要原因.

I took these steps to successfully get rid of rbenv on my mac running El Capitan (10.11.4). Rbenv is a major cause of Failed to build gem native extension errors from my experience.

  • 使用brew移除:brew remove rbenv
  • 删除.rbenv目录:rm -rf ~/.rbenv
  • 打开.bash_profile文件并删除其中包含rbenv的所有行:vi ~/.bash_profile
  • 打开.bashrc文件并删除其中包含rbenv的所有行:vi ~/.bashrc
  • Remove using brew: brew remove rbenv
  • Delete .rbenv directory: rm -rf ~/.rbenv
  • Open .bash_profile file and delete any lines with rbenv in them: vi ~/.bash_profile
  • Open .bashrc file and delete any lines with rbenv in them: vi ~/.bashrc

最后,重新加载.bash_profile.bashrc:

. 〜/.bash_profile&& . 〜/.bashrc

. ~/.bash_profile && . ~/.bashrc

这篇关于如何在macOS上卸载rbenv?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆