36

When trying to use convert(1), I get the following error:

dyld: Library not loaded: /System/Library/Frameworks/OpenCL.framework/Versions/A/Libraries/libclparser.dylib
Referenced from: /usr/local/bin/convert
Reason: image not found
Trace/BPT trap: 5

Any idea how I could fix it ?

Erik Funkenbusch
  • 92,674
  • 28
  • 195
  • 291
Pier-Olivier Thibault
  • 3,907
  • 2
  • 33
  • 33

5 Answers5

46

I was getting this error as well–with a homebrew install of ImageMagick. Along the same lines as Pascal, I fixed it with

  1. Install XCode 4.1 (from the App Store)
  2. In Xcode, go to Xcode > Preferences... > Downloads tab > click Install next to Command Line Tools
  3. Uninstall ImageMagick with brew uninstall imagemagick
  4. Update homebrew with brew update
  5. Install latest homebrew with brew install imagemagick
  6. Run brew doctor and delete any of the *.la and *.a files listed if step 4 fails on make install
Rob Barreca
  • 641
  • 6
  • 11
Callmeed
  • 4,972
  • 5
  • 34
  • 49
5

I got the same error and what solved the problem for me was:

  1. Install the latest XCode version from the Mac Appstore
  2. Install ImageMagick using Macports (sudo port install imagemagick)

Both steps took a while, but in the end ImageMagick worked fine again.

Pascal Lindelauf
  • 4,782
  • 4
  • 40
  • 55
5

I installed xcode but had some issue with macports. Bummer!

I copied the libclparser.dylib file over from an old backup of 10.6, changed the permissions to match the other files in that folder and it worked!

Also see here: https://stackoverflow.com/questions/6674666/installing-imagemagick-leads-to-weird-error-involving-opencl

Edit:

I found this, which may be useful: http://cactuslab.com/imagemagick/
Also, the file is here: http://www.workdreamer.com/uploads/libclparser.dylib

Community
  • 1
  • 1
Rimian
  • 36,864
  • 16
  • 117
  • 117
0

Try the following command:

brew doctor

to diagnose the common problems.

One of it could be removing DYLD_FALLBACK_LIBRARY_PATH variable from your ~/.profile

Or you have to re-install libtool by:

brew reinstall libtool --universal && brew unlink libtool && brew link libtool
kenorb
  • 155,785
  • 88
  • 678
  • 743
0

Reinstalling it even with brew instead of macports didn't work for me. Copying it did.

Moritz
  • 489
  • 1
  • 5
  • 18