Whenever I open Terminal I get the following messages:
bash: /etc/profile.d/sm.sh: No such file or directory
bash: /etc/profile.d/rvm.sh: No such file or directory
These don't seem to impact anything but are incredibly annoying.
The entry will be in one of the dot files which are run when you open a new terminal or login.
In your home directory you will find the entry in one of
.profile
.bashrc
.bash_profile
If it's not in there it could be in the system wide start file /etc/profile.
Related
In Ubuntu, whenever I launch terminal, on top Terminal shows a message
bash: /home/vostro/.rvm/scripts/rvm: No such file or directory
after that I can enter commands, how to fix it?
Check your .bash_profile or .bashrc file for any startup scripts that may have gotten added by RVM and you probably need to remove or comment out those lines.
Whenever I open up a new terminal I get the following:
-bash: /Users/chrisjayden/.profile: No such file or directory
I tried searching Q&A's but couldn't find anything relevant.
+ I'm pretty new to this stuff
-bash indicates that your terminal is starting a login shell. That means bash will try to execute the contents of the first of the following three files that it finds.
~/.bash_profile
~/.bash_login
~/.profile
If all three were missing, bash would not complain. Therefore, we can assume that it finds one of the first two files, and in that file is a line like source ~/.profile or . ~/.profile, which will produce the error shown if ~/.profile does not exist.
The easiest solution is to simply create an empty .profile file in your home directory.
I deleted some files/folders and moved some other folders around in my Finder. Now every time I open up terminal, the first 4 lines always list 4 files or directories like this:
-bash: cd: file-name: No such file or directory
-bash: cd: file-name: No such file or directory
-bash: cd: file-name: No such file or directory
-bash: cd: file-name: No such file or directory
I have tried to remove them using rm but just get the same message, restarting Terminal many times, and restarting my mac many times, etc I can't find them in Finder either. How do I clear terminal so it doesn't try to "look into" these non existing files or directories? I am thinking it is still reading in a path somehow, but I am fairly new to mac and terminal.
Check your bash_profile for any reference to the deleted files. If there are any deleted files listed there, remove the lines from the file and save the bash_profile. Restart Terminal.
I'm going to open this up again. I installed this thing called QSTK for some financial calculations. Now every time I open my terminal, I get this error:
/Users/DylanRichards/.profile:source:2: no such file or directory: QSTK/local.sh
Because of this error, I am unable to run programs in Sublime Text as well.
How the heck do I get rid of this?
Latest
After trying KEYSER's suggestion, here are the contents of the .profile file:
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
source QSTK/local.sh
PATH=$PATH:/Applications/Darwine/Wine.bundle/Contents/bin/
QSTK seems to have injected some line into your profile file, which is loaded by the terminal at startup. That line is trying to run a script which doesn't exist.
To get rid of the error remove line 2 in .profile (and possibly surrounding, related, lines).
It's a hidden file, so you can e.g. open it from a terminal. for example:
open -a "/Applications/Sublime Text.app/" ~/.profile
if that's the name of your sublime app (tab to autocomplete)
How do I find and edit ~/.profile?
In Terminal:
$ cd ~
$ touch .profile
$ open -e .profile
This will open the .profile file in TextEdit for your editing enjoyment.
Once you have completed your editing, save the file in TextEdit and then, in Terminal:
$ source .profile
This should avoid the need for a system restart but always a good idea to do a restart anyway when playing with fundamentals like .____ files.
I cannot use even ls command.
Before this happen I created a .profile file and
save this line
export PATH:....
I believe I gave wrong path.
Is there a way to find .profile file.
Thanks
I found the answer:
Turn on show hidden files. (I used a small app)
Check for .profile file in finder
Open the file using Text editor
Erase the wrong path.
Save the .profile file
Exit the command prompt and enter the command prompt.
Try ls command. It works
***Not magic