4

This is probably the weirdest thing you've ever seen. But it's true. I'm on macOS, and want to install devKitARM. After installing Git, the guide told me to show the program where the binaries are. It told me to execute:

echo "export DEVKITPRO=/opt/devkitpro" >> ~/.bashrc
echo "export DEVKITARM=/opt/devkitpro/devkitARM" >> ~/.bashrc
source ~/.bashrc

However, when I do this, it gives me

export: Command not found.
export: Command not found.
export: Command not found.

I looked in the ~/.bashrc and realized that there was already an export PATH command in there, probably for some system function. However, this was not being recognized the entire time. Can someone help?

  • 2
    Are you sure that you’re running bash? – Scott Sep 26 '17 at 1:09
  • I should be... I'm pretty sure it's pre-installed on macOS, and other bash commands work. Also, oddly, the man page for it exists, but the command itself not. – SirNapkin1334 Sep 26 '17 at 1:40
  • 2
    (1) “it's pre-installed” — proves nothing. (2) “other bash commands work” — what do you mean?  Are you talking about thing like cat, cp and ls?  These are not bash commands.  What happens if you just type export at your command prompt? (3) “the man page for it exists” — the man page for what? (4) “the command itself not” — what do you mean? Please do not respond in comments; edit your question to make it clearer and more complete. – Scott Sep 26 '17 at 1:58
5

Your currently running shell is the (TENEX) C shell, which does not have an export command. You cannot source a Bourne Again or POSIX shell script in the C shells. The C shell syntax is different to the Bourne/POSIX shell syntax.

Adding these environment variables to your interactive shell involves the C shell's setenv command. Having this done automatically for login shells involves the C shell's ~/.login script.

The manual installation instructions actually simply say "Add these variables in your execution environment". The Bourne Again shell is just a "for instance". Obviously, if you aren't using the Bourne Again shell, which you clearly are not, then you do what is appropriate for your actual choice of shell.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.