2013-06-05 2 views
0

저는 초심자였습니다. 내가 뭘했는지 모르지만, 지금은 항상 새로운 터미널을 시작 할 때마다 나는 항상 export LIBRARY_PATH=/opt/local/lib해야합니다. 이것은 내가 생각한 OSX의 기본 경로이며, 어떻게 든 그것을 무효화했을 수도 있습니다.OSX를 사용하여 bash 용 LIBRARY_PATH를 엉망으로 만들었습니다.

방금 ​​gsl 라이브러리와 같은 것을 실행할 때마다 osx에 bash의 기본 경로가 설정되어 있으므로 입력 할 때 짜증나게 되었습니까? 제공 할 수있는 도움에 감사드립니다.

+0

'LIBRARY_PATH' 또는'LD_LIBRARY_PATH'에 추가 할 수 있습니다? – devnull

+0

'/ opt/local/lib'는 Mac OS X의 기본 라이브러리 경로에 * 없습니다 * 있습니다. 어디서나 기본 설정이 확실하지 않습니다. 어쩌면 당신은'/ usr/local/lib'을 생각하고 있을까요? [dyld (1)] (https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/dyld.1.html) 및 [dlopen (3)] (https : 자세한 내용은 /developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man3/dlopen.3.html#//apple_ref/doc/man/3/dlopen)을 참조하십시오. –

답변

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. 
관련 문제