export: command not found

I have been trying to install something via MacPorts and was following a blog that described setting the PATH appropriately so that the port command would work, however when I updated .bash_profile as described in the blog and tried to source it, it gives me the error, "export: command not found."


currently echo $PATH returns: /Library/Frameworks/Python.framework/Versions/2.7/bin:/usr/bin:/bin:/usr/sbin:/ sbin:/usr/local/bin:/usr/X11/bin


Any thoughts on how to proceed?

MacBook Pro (13-inch Mid 2010), Mac OS X (10.7.5)

Posted on Jun 26, 2013 10:30 AM

Reply
1 reply

Jun 26, 2013 10:38 AM in response to gnrl13579

Please post the actual code.


Also are you sure you are using the 'bash' shell (or sh, ksh, zsh shells)? With all these shells 'export' is a built-in command and should never be "not found".


Could you be using the csh or tcsh shell? If you are using one of these shells, then setting environment variables is done using the 'setenv' command, which is also a csh/tcsh built-in.


Use the following command to see what your default shell is:


dscl . -read $HOME shell


If you have csh or tcsh as your shell, then use something like the following to set your PATH environment variable:


setenv PATH "$PATH:/the/stuff/you/are/adding"

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

export: command not found

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.