Error on terminal start

让人想犯罪 __ 提交于 2019-11-28 09:59:33
Homan

Take a look at the source of /etc/profile.

On 10.8 of Mac OS, installing RVM while using sudo, adds a line to /etc/profile.d/rvm.sh. Even if you remove RVM using rvm implode, that one liner stays in there and will cause that error to show on start up of any terminal.

user502536

Use your favorite text editor (nano,vim, etc) to open /etc/profile and comment out these two lines:

source /etc/profile.d/sm.sh
source /etc/profile.d/rvm.sh

Then save the file.

To fix any issues with sourcing RVM use:

rvm get stable --auto-dotfiles #OR:
rvm get head --auto-dotfiles

It will remove existing sourcing lines and add new ones that are meant to work.

Mark Fraser

This is happening due to a botched installation of RVM (at least the part that tried to install the shell loader was botched). Did you recently try to install RVM?

Something kept trying to insert the RVM load code and it has made a mess.

Here is my suggestion:

  1. Make a backup copy of your .bash_profile.
  2. Open it in a text editor and remove everything but:

    export PATH=/Applications/SenchaSDKTools-2.0.0-Developer-Preview:$PATH 
    export PATH=/Applications/SenchaSDKTools-2.0.0-Developer-Preview/command:$PATH
    export PATH=/Applications/SenchaSDKTools-2.0.0-Developer-Preview/jsbuilder:$PATH
    

Add this line below that:

[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"

Save it and open another terminal and see if the error goes away.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!