Ubuntu: Source command still looking for bashrc file in the wrong folder



Question:

I am new to ubuntu and basically know nothing. I am using ubuntu 12.04 (need this exact version). I was trying to install OpenFOAM 2.1.1, from the source code. I needed to source the bashrc file, I did exactly as explained on their website (http://openfoam.org/download/2-1-1-source/) but it did not work. I needed OpenFOAM urgently, so I downloaded normally rather than from the source code. When you install that way, OpenFOAM is created in /opt instead of home. OpenFOAM was working, but the solver I was gonna use was not, so I removed OpenFOAM completely. Now I'm trying to install from the source code again, and in source bashrc step, I keep getting this error:

bash: /opt/openfoam211/etc/bashrc: No such file or directory  

Why is it still trying to source to the old file that does not even exist anymore? The annoying thing is, I did it before, exact same computer, exact same steps, but I reinstalled ubuntu a while back (same exact ubuntu) and this time I can't do it.

Edit: Apparently I thought bashrc and .bashrc is the same thing, and they were obviously not. Problem solved.


Solution:1

From the comments...

When editing your ~/.bashrc file, the instructions say to add the following command...

source $HOME/OpenFOAM/OpenFOAM-2.1.1/etc/bashrc  

and you entered...

source /opt/openfoam211/etc/bashrc  

You could actually even leave the edit out of ~/.bashrc, because the file at $HOME/OpenFOAM/OpenFOAM-2.1.1/etc/bashrc is effectively empty.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »