RVM removes / usr / bin from my PATH

reference

I recently uninstalled rvm:

rvm implode 

then reinstall it:

 curl -L get.rvm.io | bash -s stable 

Unfortunately, now when I try to run most (not all) rvm commands, it removes / usr / bin from my PATH and therefore cannot find all the command line commands it needs, such as grep, sed, etc. I have included the unedited copy and paste of my console below:

 [~]$ echo $PATH /opt/local/bin:/opt/local/sbin:/Developer/usr/bin:/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/Users/Thai/.rvm/bin [~]$ rvm use Now using system ruby. [~]$ echo $PATH /opt/local/bin:/opt/local/sbin:/Developer/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/Users/Thai/.rvm/bin [~]$ 

The same thing happens with rvm install... and rvm remove... but not rvm help or rvm info .

Any ideas on what's going on? rvm install... crashes after compilation because it needs to access the command line utilities in / usr / bin

+4
source share
3 answers

You need to export the bin path in your .bash_profile

export PATH=$HOME/bin:$PATH should do the trick.

0
source

Check / etc / environment for the system path.

I assume that RVM redefines the path somewhere, and rvm implode does not remove the offensive script because PATH / usr / bin is missing. Try adding the path manually and starting rvm implode.

0
source

this happens when RVM tries to clear PATH of all rvm , basically it means that you have a very old system with /usr/bin/rvm - just remove it:

 sudo rm /usr/bin/rvm 
0
source

Source: https://habr.com/ru/post/1438776/


All Articles