2

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


Alright guy's im close to solving my problem

I just used

sudo open /etc/profile

and I found these two lines, when i try to edit, it says you do not have permission to make changes in this file and ask for making a duplicate...

just tell me how to comment these lines with admin privileges.

Solution which worked:

"your last answer worked! I meant to say this I did: sudo nano /etc/profile put # before the two paths press command x saved the file"

Fawad
  • 153
  • 1
  • 4
  • 16
  • You may want to check out this [question](http://stackoverflow.com/questions/9839748/error-on-terminal-start) ... it might even be as simple as commenting out a couple of lines in the `/etc/profile` :) – summea Mar 12 '13 at 18:46
  • my top home directory is fawadn I'm into right now.. how can I see the files in this directory? and how can I comment this line.. – Fawad Mar 12 '13 at 18:58
  • Alright, so here's the explicit version: sudo nano /etc/profile.d/sm.sh # Remove the reference to /etc/profile.d/rvm.sh (delete that line entirely), save the file (CTRL-O) –  Mar 12 '13 at 19:26
  • @RonDahlgren this file is empty. I updated my question, can you help me with that? – Fawad Mar 12 '13 at 19:29
  • Hmmm. ok. So that means the output is probably from a level higher and references both sm.sh and rvm.sh - neither of which are found. So to be clear, the right way to fix this would be to check the system-wide files that I referenced in my answer, but you are in a hurry and seem to be rather new to *nix land, so here's my quick hacky solution: 'sudo mkdir -p /etc/profile.d && sudo touch /etc/profile.d/sm.sh && sudo touch /etc/profile.d/rvm.sh' (no need to use single quotes) NOTE! This is not actually fixing the problem, just hiding the symptoms. To actually fix it, see my answer below! –  Mar 12 '13 at 19:33
  • your last answer worked! I meant to say this I did sudo nano /etc/profile put # before the two paths press command x saved the file. worked! thanks... yea i was quiet in a hurry... – Fawad Mar 12 '13 at 20:08

1 Answers1

3

From the bash man page

FILES
       /bin/bash
              The bash executable
       /etc/profile
              The systemwide initialization file, executed for login shells
       /etc/bash.bashrc
              The systemwide per-interactive-shell startup file
       /etc/bash.bash.logout
              The systemwide login shell cleanup file, executed when a login shell exits
       ~/.bash_profile
              The personal initialization file, executed for login shells
       ~/.bashrc
              The individual per-interactive-shell startup file
       ~/.bash_logout
              The individual login shell cleanup file, executed when a login shell exits
       ~/.inputrc
              Individual readline initialization file

You will want to check the systemwide files and see if they are referencing rvm. If you are the only user on your system (it is your workstation or your home computer), feel free to modify these files to remove the rvm reference (assuming you aren't using rvm anymore). Otherwise, ask your system administrator to fix the execution environment.

More information on rvm can be found here, and your online manual pages can provide more details about what files bash reads by default.

Failing all of the above, a quick and dirty hack would be to execute

 touch /etc/profile.d/rvm.sh

as a user with the appropriate permissions.

  • but I need to navigate to this directory right? i think these are definitely at my top home directory what is the command to check files in terminal, like in windows its dir – Fawad Mar 12 '13 at 18:55
  • The ls command is used to list files in a directory. You will probably want to checkout a beginner's tutorial on navigating around with the shell. See http://linux.org.mt/article/terminal/ and http://linuxcommand.org/learning_the_shell.php to get you started! –  Mar 12 '13 at 19:04
  • I updated my question, can you please tell me how to delete this for now. I like to learn by solving whatever problem comes to me. – Fawad Mar 12 '13 at 19:12