When I start my Terminal I get this error. I have no clue how to fix that and where it comes from.
Last login: Fri Nov 30 21:46:06 on ttys000
-bash: export: `/usr/local/bin': not a valid identifier
Most likely one of the 'export' command in your .bashrc or .bash_profile is mis-configured.
Open up your favorite text editor and view the file(s) in your home directory called .bashrc and .bash_profile.
Look for any lines that begin with
export
one of the lines should be
export PATH='/usr/local/bin'
there might be spaces between PATH and the first '
export PATH = '/usr/local/bin' #<----WRONG remove spaces
if not, copy the contents here and let's have a look.
An alternative if you can't find it is to grep through your home dir or /etc:
grep -l -E '/usr/local/bin' .*
make sure you use single quotes to escape the forward slash. then look at the files it lists for the mis-typed export.
export $PATH
somewhere - the dollar sign does not belong there.
export PATH=/usr/local/bin:$PATH
OSX has used the path locations in a few files over the 10.6/7/8:
~/.profile #local user
/etc/profile #system wide defaults for ^
/etc/paths #<---This is probably the one you want to check in.
Check all of those for the path's, as @choroba said above the $ is only for the end of the line, so similar to: export PATH=/opt/local/bin:/usr/sbin:$PATH
for i in `find / -maxdepth 3 -iname "*profile*"`; do grep -i "*path*" ${i}; done
I know that is how it works on linux, so it should work. Though, it may be a long search...
Nov 30, 2012 at 21:59