How to add /usr/local/bin/ to command-search path
MAFFT is installed into the /usr/local/bin/ directory. This directory is included in the default command-search path of Mac OS X 10.5 (leopard), but not included in that of Mac OS X 10.4 (tiger). You can check and modify your path as follows.STEP 1 Open a terminal window (Finder → Applications → Utilities → Terminal).
STEP 2 Check whether mafft is already in your path by typing 'which mafft':
prompt$ which mafft no mafft in /bin /sbin /usr/bin /usr/sbin → Click here to show/hide STEP 3.
prompt$ which mafft (Nothing returned) → Click here to show/hide STEP 3.
Open a new Terminal (Command+N) and test the change:
prompt$ echo $SHELL
/bin/tcsh → Your shell is tcsh. → Click here to show/hide STEP c4.
prompt% cat << EOF >> ~/.cshrc
set path = ( /usr/local/bin \$path )
prompt% echo $PATH
/usr/local/bin:/xx/xx:/xx/xx → OK!
If /usr/local/bin does not appear,
make the same modification to
other configuration files, such as
~/.tcshrc, instead of to ~/.cshrc.
STEP c5. Open a new Terminal (Command+N) and test the change:
prompt$ which mafft /usr/local/bin/mafft → Nothing to do!
prompt$ which mafft /somewhere/else/mafft prompt$ rm /somewhere/else/mafft → Re-install mafft → Return to STEP 2.In the last case (ie. if you have installed mafft at a different directory than /usr/local/bin/), we recommend to use /usr/local/bin/mafft instead of the unusual installation (/somewhere/else/mafft) unless you have a special reason.
See also here and here.