0

I need to install Gerris on mac 10.9.1. The website http://gfs.sourceforge.net/wiki/index.php/Mac_OSX_Installation says:

Note: make sure that the file ~/.profile contains the line source ~/.bashrc
for these changes to be taken into account.

But there is no source ~/.bashrc as shown below:

GNU nano 2.0.6        File: /Users/samirebalta/.profile                       


# MacPorts Installer addition on 2014-01-21_at_11:48:31: adding an appropriate $
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
# Finished adapting your PATH environment variable for use with MacPorts.


##
# Your previous /Users/samirebalta/.profile file was backed up as /Users/samire$
##

# MacPorts Installer addition on 2014-01-21_at_12:00:12: adding an appropriate $
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
# Finished adapting your PATH environment variable for use with MacPorts.


##
# Your previous /Users/samirebalta/.profile file was backed up as /Users/samire$
##source ~/.bashrc

                               [ Read 23 lines ]
^G Get Help  ^O WriteOut  ^R Read File ^Y Prev Page ^K Cut Text  ^C Cur Pos
^X Exit      ^J Justify   ^W Where Is  ^V Next Page ^U UnCut Text^T To Spell
Meva
  • 383

1 Answers1

2

What that tutorial is telling you is that the file ~/.profile should contain this line:

source ~/.bashrc

Your's doesn't so just open it in nano as you've done, add the line above and save the file.


On most *nix systems, when you open a terminal, you start what is known as an interactive, non-login shell and when bash is started in this mode, it reads the file ~/.bashrc.

OSX, however, for reasons I have never understood, has set up its system so that when you start a terminal, it opens a login shell instead. Such shells behave differently and do not read ~/.bashrc but instead read ~/.profile. Read the link above for more information on these different shell types.

The tutorial you are following tells you to make changes to your ~/bashrc file and then to tell your ~/.profile to import ~/.bashrc. That's what the source command does. If you do not source ~/.bashrc, the changes will be ignored on your mac.

terdon
  • 242,166
  • terdon thank u so much but I have already added that line but when I type brew install gtkglext it shows -bash: brew: command not found.............Gerris web page http://gfs.sourceforge.net/wiki/index.php/Mac_OSX_Installation – Meva Jan 26 '14 at 21:32
  • @user3115779 please [edit] your question to add extra information since the formatting is lost in the comments. You can then @ping me to let me know (just add a @ to my username and post a message). Anyway, this is a different problem, you don't have brew installed. Did you follow the instructions on the linked page to get that to work? If not, please post a new question for this issue instead of continuing it here. – terdon Jan 26 '14 at 21:35