Mac OS X 10.9 - setting permanent environment variables

前端 未结 5 1952
执念已碎
执念已碎 2020-12-01 04:09

How do I set a permanent environment variable (i.e. one that does not need exporting every time I start a new Terminal session) in Mac OS X 10.9? I\'ve found a number of ans

5条回答
  •  我在风中等你
    2020-12-01 04:37

    Drop the $(...) bit, which would attempt to execute the command within the brackets and set $MULE_HOME to whatever it produces. In your case /opt/mule-standalone-3.4.0 is not an executable, hence the error you are getting.

    export MULE_HOME=/opt/mule-standalone-3.4.0
    

    and use ~/.bashrc not ~/.bash_profile.

    EDIT: It seems opinion is that you should set environment variables in your ~/.bash_profile script, and not ~/.bashrc script.

提交回复
热议问题