使用OSX搞砸了我的LIBRARY_PATH for bash

时间:2013-06-05 05:18:17

标签: macos bash environment-variables

我是新手,我把事情搞砸了一段时间。我不知道我做了什么,但现在每当我启动一个新终端时,我总是要export LIBRARY_PATH=/opt/local/lib。这是我认为的OSX的默认路径,我想我可能已经以某种方式取消了它。

每次我想运行像gsl库这样的东西时,输入osx的bash的默认路径是什么?感谢您提供的任何帮助。

1 个答案:

答案 0 :(得分:1)

您可以将其添加到~/.bash_profile

§ Invocation

When bash is invoked as an interactive login shell, or as a non-interactive shell
with the --login option, it first reads and executes commands from the file 
/etc/profile, if that file exists. After reading that file, it looks for 
~/.bash_profile, ~/.bash_login, and ~/.profile, in that order, and reads and 
executes commands from the first one that exists and is readable.