RVM安装缺少$ PATH(RVM installation missing $PATH)

2019-09-02 04:10发布

当我试图重新安装最新版本的RVM,RVM给了我与缺少或不正确的“$ PATH”变量中的错误通知。 有谁知道(一)这是什么变量应设置为和(b)如何改变呢?

我已经搜查几十个线程,但没有出现正是引用了这个问题。 任何帮助将不胜感激。

谢谢,科迪

Codys-MacBook-Pro:demo_app Cody$  rvm get head && rvm reload
######################################################################## 100.0%
Downloading RVM from wayneeseguin branch master
Upgrading the RVM installation in /Users/Cody/.rvm/
RVM PATH line found in /Users/Cody/.bashrc /Users/Cody/.zshrc.
RVM sourcing line found in /Users/Cody/.bash_profile /Users/Cody/.zprofile.

Upgrade Notes:

/Users/Cody/.bash_profile:3:export PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/git/bin:/Users/Cody/.rvm/bin

* WARNING: Above files contains `PATH=` with no `$PATH` inside, this can break RVM,
for details check https://github.com/wayneeseguin/rvm/issues/1351#issuecomment-        10939525
to avoid this warning append #PATH.

Upgrade of RVM in /Users/Cody/.rvm/ is complete.

Answer 1:

这不是一个错误,解决方法是$ PATH预先考虑到您的出口PATH =行,所以你应该有:

export PATH=$PATH:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/git/bin:/Users/Cody/.rvm/bin


Answer 2:

该消息显示给你,因为它是不好的做法,硬编码PATH ,它打破即例如在做任何动态配置/etc/profile.d/*.sh ,这里是OH-MY-ZSH错误=> https://github.com/robbyrussell/oh-my-zsh/pull/1359

要修复它只是删除行,它永远也不应该有。



文章来源: RVM installation missing $PATH
标签: ruby rvm