0

I am trying to remove the following Terminal error message:

-bash: /etc/profile.d/rvm.sh: No such file or directory

I recently uninstalled RVM (Ruby Version Manager) from my MacBook Air. The terminal error appeared after I finished the RVM uninstall. The error appears every time I launch Terminal. My troubleshooting so far (seaching google etc.) lead to suggestions to modify my bash files. I have checked the two files listed below and found nothing pointing to "/etc/profile.d/rvm.sh"

  • ~/.bashrc
  • ~/.bash_profile

Am I missing a bash file that is causing the error? I was assuming the error had to stem from one of those two files listed above, but obviously I was wrong.

1

You should also look at /etc/profile file, as it may have references to /etc/profile.d/rvm.sh.

It's also worth it to read the manual for bash, as it lists all files bash will look at for configuration. This will be towards the end of the man page. To read it, in Terminal.app type man bash.

Finally, you can run, again in Terminal.app, the following command:

grep -R 'rvm.sh' /etc

This will look for all files inside /etc, recursively, that contain rvm.sh text in them.

  • AH! Thanks very much Mike! I did see a reference in /etc/profile. Did not know to look at that file. One question - the file is locked. I tried to duplicate the file and delete the original, but it caused other problems. Any idea on how to authenticate myself to edit /etc/profile? – ckib16 Jul 20 '14 at 19:10
  • 1
    Sure. You can use sudo command. If you're using vi to edit /etc/profile you can type: sudo vi /etc/profile - it will ask you for your own password (NOT the root!) and after that it should let you edit the file. Obviously if you're using a different editor (e.g. nano) the command will be sudo nano /etc/passwd – mike Jul 20 '14 at 19:25
  • Never mind Mike. I found it myself. Useful little hint to allow TextEdit to modify locked files. I had to use the terminal command in the article below and then drag the profile file onto text edit. I was then able to modify and save. Make sure you quit out of TextEdit afterwards to get rid of its temporary SUDO powers: mactricksandtips.com/2008/05/… – ckib16 Jul 20 '14 at 19:25
  • Hah, looks like we cross-posted. Thanks for the help Mike, very useful! Problem is all fixed. – ckib16 Jul 20 '14 at 19:26
-1
cd /etc/profile.d/
ls

the output will contain a file such as vte-XXX.sh just type

cp vte-XXX.sh vte.sh
  • On my machin there is no such directory so you need to exaplin more – user151019 Jan 30 '18 at 20:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .