Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm trying to get MySQL-python working on my mac. I have to put this line in the terminal to fix an error, specifically "_mysql.so image not found". The source of this line tells me I should put it in my .profile for it to stick permanently.

I'm interested in learning what actually caused the error in the first place instead of just a quick fix. What exactly does this line do?

export DYLD_LIBRARY_PATH=”$DYLD_LIBRARY_PATH:/usr/local/mysql/lib/
share|improve this question

migrated from stackoverflow.com Mar 22 '13 at 8:40

This question came from our site for professional and enthusiast programmers.

1 Answer 1

up vote 1 down vote accepted

It appends /usr/local/mysql/lib/ to the DYLD_LIBRARY_PATH environment variable

DYLD_LIBRARY_PATH

          This is a colon separated list of directories  that  contain  libraries.  The  dynamic  linker
          searches  these  directories before it searches the default locations for libraries. It allows
          you to test new versions of existing libraries.

          For each library that a program uses, the dynamic linker looks for it  in  each  directory  in
          DYLD_LIBRARY_PATH  in  turn.  If  it still can't find the library, it then searches DYLD_FALL-
          BACK_FRAMEWORK_PATH and DYLD_FALLBACK_LIBRARY_PATH in turn.

          Use the -L option to otool(1).  to discover the frameworks and shared libraries that the  exe-
          cutable is linked against.

http://developer.apple.com/library/mac/#documentation/Darwin/Reference/Manpages/man1/dyld.1.html

PS: presumably you've lost a closing double quote char somewhere

share|improve this answer
    
Thanks! While I was researching this, I came across a couple places that are supposedly similar with .profile, such as bash_profile and bash_rc. Is there a place where I can read up on the differences of these files? –  Wesley Mar 22 '13 at 2:46
    

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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