Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

When I try and run curl in the OS X Terminal I get the following error:

dyld: Library not loaded: /usr/local/lib/libcurl.4.dylib
  Referenced from: /usr/local/bin/curl
  Reason: Incompatible library version: curl requires version 7.0.0 or later, but libcurl.4.dylib provides version 5.0.0
Trace/BPT trap

I have a suspicion this is something to do with fink - as I installed a number of things from fink. However, I have tried removing and reinstalling curl with fink and it still refuses to work. I can't seem to get it to find a correct version of libcurl whatever I do.

Any ideas? Update: Output of running env in the terminal is below:

MANPATH=/sw/share/man:/usr/local/share/man:/Library/Frameworks/EPD64.framework/Versions/Current/share/man:/usr/share/man:/usr/local/git/share/man:/usr/texbin/man:/usr/X11/man:/sw/lib/perl5/5.10.0/man:/usr/X11R6/man
TERM_PROGRAM=Apple_Terminal
TERM=xterm-color
SHELL=/bin/bash
CLICOLOR=1
TMPDIR=/var/folders/+w/+wmZARshFrCjcx1M3ByCFk+++TQ/-Tmp-/
PERL5LIB=/sw/lib/perl5:/sw/lib/perl5/darwin
Apple_PubSub_Socket_Render=/tmp/launch-E8utdf/Render
TERM_PROGRAM_VERSION=273.1
USER=robin
COMMAND_MODE=unix2003
SSH_AUTH_SOCK=/tmp/launch-nlYhE5/Listeners
__CF_USER_TEXT_ENCODING=0x1F7:0:0
PATH=/sw/bin:/sw/sbin:/usr/local/bin:/usr/local/sbin:/opt/local/bin:/opt/local/sbin:/Users/robin/todo:/Applications/TeXCount:/Applications/latexmk:/usr/local/Cellar/gettext/0.17/bin/:/Library/Frameworks/EPD64.framework/Versions/Current/bin:/Library/Frameworks/GDAL.framework/Versions/1.7/Programs/:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Applications/itt/idl71/bin:/usr/local/git/bin:/usr/texbin:/usr/X11/bin:/usr/X11R6/bin
MKL_NUM_THREADS=1
PWD=/Users/robin/builds/ridl
LANG=en_GB.UTF-8
AUTOJUMP_DATA_DIR=/Users/robin/.local/share/autojump
SHLVL=1
HOME=/Users/robin
DYLD_LIBRARY_PATH=:/Applications/itt/idl71/bin/bin.darwin.x86_64
PYTHONPATH=/usr/local/lib/python:
LOGNAME=robin
PROMPT_COMMAND=: && { (autojump -a "$(pwd -P)"&)>/dev/null 2>>${AUTOJUMP_DATA_DIR}/.autojump_errors;} 2>/dev/null
INFOPATH=/sw/share/info:/sw/info:/usr/share/info
DISPLAY=/tmp/launch-RRRwWC/org.x:0
_=/usr/bin/env
OLDPWD=/Users/robin/builds/ridl/CMake
share|improve this question
    
What is the output of 'env' in your terminal? Looks like your environment is picking up the built-in version of libcurl first (/usr/lib/libcurl.4.dylib), which is used by /usr/bin/curl, whereas the fink version of curl really wants something newer (presumably from /usr/local/lib). If so, I'm not sure why it's not just ignoring the first, too-old version that it finds, though. –  scottishwildcat May 23 '11 at 15:50
    
@Calum - I've added the output to the end of my question. Cheers. –  robintw May 23 '11 at 16:10
    
@Calum Oh, and interestingly, if I run /usr/bin/curl I get the same error. Looks like the version in /usr/lib isn't right either! –  robintw May 23 '11 at 16:12
    
Hmm, probably needs more of a Unix-head to step in at this point! As a matter of interest, what does '/usr/bin/curl --version' show? It should show v7.19.7, for OS X 10.6.7. You might also want to try temporarily unsetting DYLD_LIBRARY_PATH, just to see what happens -- I always try not to set it unless I really need it for the job at hand, as it can cause this sort of issue too. –  scottishwildcat May 23 '11 at 16:51
1  
I dount this is Fink as Fink installs in /sw not /usr/local. /usr/local would be for installs direct from source or other direct installs - I also note /opt/local/bin which is usually macports - only use one ports as they aren't tested with others (given that path have you used homebrew for anything as that could be the source of curl) –  Mark May 23 '11 at 18:18
show 1 more comment

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.