export PATH=$PATH:/opt/local/bin
export MANPATH=$MANPATH:/opt/local/share/man
export INFOPATH=$INFOPATH:/opt/local/share/info
Included the above lines in .bash_profile (my mac is using bash shell) and voila a nagging problem sudo: port: command not found is gone!!!
sudo port -d selfupdate
ran successfully. Now I was able to install FreeImage by running:
sudo port install freeimage
Thank you for this. It was extremely helpful when trying to get my Mac set up with the tools that I need!
ReplyDeleteHi there:
ReplyDeletehere is my .bash_profile. I don't know why it can not work! Please give me some hits. Thanks!
My main purpose is to use ImageMagick such as the guide as the website--http://www.imagemagick.org/script/binary-releases.php#macosx
Michael
changks@nrel.colostate.edu
===
# Fri Sep 15 17:09:50 MDT 2006 - MODIS Reprojection Tool modifications
PATH=$PATH:/Users/changks/MRT/bin:/Users/changks/Grads/bin:/usr/local/ferret/bin/ferret_paths_bash_template
MRTDATADIR=/Users/changks/MRT/data
export MRTDATADIR
#export HOME=/Users/changks
export BASH_ENV=$HOME/.bashrc
export DISPLAY=129.82.99.149:0.0
export PATH=$PATH:/opt/local/bin
export MANPATH=$MANPATH:/opt/local/share/man
export INFOPATH=$INFOPATH:/opt/local/share/info
#/usr/bin/java -Dmrtdatadir=$/Users/changks/MRT/data -classpath$/Users/changks/MRT/bin/ModisTool.jar edu.sdsmt.modis.ModisTool
#PATH=/usr/local/bin:$PATH
#export PATH
#-------------------------------
# necessary path for executables
#export
# GrADS directory
#export GASCRP=/Users/changks/gradsscripts
export GADDIR=/Users/changks/Grads/data
#export GAUDFT=/Users/changks/Grads/udf
export GASCRP=/Users/changks/Grads/bin
# NEdit text editor
#export PATH=$PATH:/Users/changks/NEdit
#unset USERNAME
#test -r /sw/bin/init.sh && . /sw/bin/init.sh
unset MAILCHECK
#----------------------------------------------------------
# Fri Sep 15 17:09:50 MDT 2006 - MODIS Reprojection Tool modifications
bindkey -e
alias vt100 "set term=vt100"
if ( $?DISPLAY == 0 ) then
setenv DISPLAY localhost:0
endif
set path = ( ~/bin $path /usr/local/bin .)
senenv R_LIBS ${HOME}/Library/R/library:/sw/lib/R/library
source /sw/bin/init.csh
source /usr/local/ferret/bin/ferret_paths
alias ferret 'ferret -nojnl'
alias gvas 'gv --orientation=seascape --noantialias'
alias gval 'gv --orientation=landscape --noantialias'
alias gvl 'gv --orientation=landscape'
alias top '/usr/bin/top -ocpu -R -F -s 2 -n30'
setellipsis
set prompt = '%{\e]0;%c3\007%}{\ek\e\\%}%S%D %w %T%s %U%m%u:%B%~%b%# '
alias matlab '/Applications/MATLAB704/bin/matlab -nojvm -nosplash'
set path = ( $path /Users/changks/MRT/bin )
setenv MRTDATADIR /Users/changks/MRT/data
source /usr/local/ferret/bin/ferret_paths
setenv EDITOR 'edit -w'
# Mon Feb 26 11:32:59 MST 2007 - MODIS Reprojection Tool modifications
PATH=$PATH:/Users/changks/MRT/Modis/bin
MRTDATADIR=/Users/changks/MRT/Modis/data
export MRTDATADIR
worked fine for me. thanks :)
ReplyDeleteworked like a charm, wonderful thank you
ReplyDeleteSeems like this worked fine for most of you so i thought il try it.
ReplyDeleteUnfortunaley i cant find my .bash_profile file.
Where is it normally?
just try doing the following:
ReplyDeletevi .bash_profile
then hit o to add a new line, paste the lines posted, hit esc to end editing and hold shift and hit zz to save. Then quit & restart your terminal and you should be golden.
Dan:
ReplyDeletethank you, you answered the question I had (where is the file) -- and how to modify it -- perfectly!
thanks for this!
ReplyDeletethanks a ton :)
ReplyDeletethanks a million! this fixed everything.
ReplyDeletethanks dan! i was looking for this solution now quiet a time!
ReplyDeleteHi, I was wondering if someone could help me- i have a macbook running leopard 10.5. I am new to macs but pretty experienced with unix/linux. The problem is that after making some changes to my .bashrc file my bash commands have stopped working. I cannot even use ls, cp, mv etc. Please can someone help
ReplyDeleteA bit late in the life of this thread but look for ~/.profile instead. I have 10.5.2 and it certainly has no .bash_profile but, like some other *nixes, uses .profile.
ReplyDeleteawesome. thank you.
ReplyDeletecheers! thanks for the post! -kfjb
ReplyDeleteThank you very much.
ReplyDeleteThank you ever so much! I can run Thunderbird over ssh now!
ReplyDeleteI don't know if it fixed it for me, but t got rid of the message! (I think it all worked fine, but my command was bad, as I can now do sudo port, and it accepts that now) Thanks a bunch!!
ReplyDeletehey, it's OK if i put down the lines on bash when i first opened up terminal and pressed enter for each line? i did not open up .bash_profile before i included the lines. yeah, i opened up .bash_profile later and included the lines, but i hope putting the lines straight after opening the terminal did not do anything.
ReplyDeleteThank you for the post, it was driving me nuts.
ReplyDeleteThank you very much. :)
ReplyDeleteThank you. That worked for me, too! :)))
ReplyDeleteThanks!
ReplyDeleteThanks!
ReplyDeleteJust one more post of thanks--also thanks to dan for the helpful instructions for a neophyte.
ReplyDeleteWas of great help! Thanks for posting.
ReplyDeleteyou saved me from a whole lot of frustration - thanks :)
ReplyDeletefollowing the rails install guide my .bash_login file looked like this:
ReplyDeleteexport PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH"
export MANPATH="/usr/local/man:$MANPATH"
simply adding: export INFOPATH=$INFOPATH:/opt/local/share/info
did not work, so i removed all of what i had cut n paste your lines and it installed. It worked however I am concerned about future conflicts. I will post your lines above my previous lines and see how that works out.
Thanks for posting this.
This comment has been removed by the author.
ReplyDeleteThanks a lot. Your suggestions really solved this problem.
ReplyDeleteso useful, thanks dan and all other posters
ReplyDeleteworked for me! thanks
ReplyDeleteThank you very much!
ReplyDeleteThank You!!!
ReplyDeleteI spend my day on this, and now works!!!
Best Regards from Brazil!!!
Thank you this was very helpful for me!!!
ReplyDeleteThank you, thank you, thank you :) Worked perfectly and I didn't have to scroll through a million bits of bullsh*t to get the information I needed!
ReplyDeleteMuch appreciated!! :D
Can you close the comments on this blog entry?
ReplyDeleteThanks a lot :)
ReplyDeleteAlways keep forgetting to push the path env variables into the bashrc/profile
Thanks for your post... :D
ReplyDeleteJefferson Fernandes, Brazil.
04/07/2012
Thanks also. Worked for me with Lion.
ReplyDeleteThanks a lot man
ReplyDeleteIt didn't work for me.
ReplyDelete