Page 1 of 1

dyld: Library not loaded

Posted: 2012-12-18T17:26:55-07:00
by oneimage
I installed ImageMagick (ImageMagick-x86_64-apple-darwin12.2.0.tar) on my MacBook Air (Software OS X 10.8.2 (12C3006)) but whenever I try to run a utility I get the error "dyld: Library not loaded: /ImageMagick-6.7.9/lib/libjpeg.8.dylib
Referenced from: /Applications/ImageMagick-6.8.0/bin/identify
Reason: image not found
Trace/BPT trap: 5" which is suspicious since the actual folders in the application have the version number 6.8 but the error says it is looking for a library with the string 6.7.9. Can you see that above? Doesn't that sound like an error in the compiled version? Why should it be looking for a library for an older version of the software?

I am so desperate to start playing with ImageMagick! I need it to work. :-) I had no idea it existed before today, and the features I think I need the most are "locate image A in image B" and "return the average red colour value in image A". (I'm not sure if it can do the latter yet.)

Re: dyld: Library not loaded

Posted: 2012-12-18T18:12:14-07:00
by fmw42
I am not an expert on this error, but often when there is a libjpeg issue it is because you have two version of libjpeg ( typically 6 and 8 ) installed and IM is getting the wrong one.

Check for other version of libjpeg. You may have had it installed for some other delegate or dependency.

Re: dyld: Library not loaded

Posted: 2012-12-18T18:39:02-07:00
by oneimage
I'll see if I can figure out how to do what you suggest, thanks, and maybe it will work. But I just did a clean install. If I reinstall it will it possibly start working? I am not sure I'm qualified to help developers troubleshoot problems with this build.

Re: dyld: Library not loaded

Posted: 2012-12-18T19:27:54-07:00
by fmw42
try


find /usr | grep "libjpeg"

or

find /opt | grep "libjpeg"

/opt/local/lib/libjpeg.8.dylib
/opt/local/lib/libjpeg.a
/opt/local/lib/libjpeg.dylib
/opt/local/lib/libjpeg.la
/opt/local/share/doc/jpeg/libjpeg.txt

Re: dyld: Library not loaded

Posted: 2012-12-18T20:57:33-07:00
by oneimage
The file name that you are asking me to look for definitely does not exist in /opt and does not appear to exist in /usr (although that returned a warning saying that it wasn't "permitted" to search in /usr/sbin/authserver. But since I'm handy with UNIX I noticed that that directory had no "permissions" for "group" or "others". I used the chmod command to make it readable but all I got was "Permission Denied" again. So I googled it and it said I have to change to root in order to change permissions, and when I say "su root" and then enter the only password I've ever used on this MacBook, the response was "su: Sorry")

But the above parenthesis is probably a red herring. The file doesn't appear to be on my system. Any other suggestions? May I ask a question? Should the program work in Mac OS X after a clean install, or is there likely to be some jiggling required to make it work? I *really* want to use this and I will spend many hours trying to get it to work. I have a second computer, I can try it on that one to see if this problem exists on "all" Mountain Lion computers or just this one.

Re: dyld: Library not loaded

Posted: 2012-12-18T21:04:17-07:00
by fmw42
on my MacBook Air (Software OS X 10.8.2 (12C3006)) but whenever I try to run a utility I get the error "dyld: Library not loaded: /ImageMagick-6.7.9/lib/libjpeg.8.dylib
Have you tried to install a newer version of IM? It is now at 6.8.0.10. It is possible that after a clean install, you wiped out something needed for IM.

What "utility" were you trying to use? Was that an IM command? What was the exact command?

Re: dyld: Library not loaded

Posted: 2012-12-18T23:15:28-07:00
by oneimage
The version I downloaded is 6.8.0. When I said clean install, I should have said initial install, because I have never installed it before! Perhaps that wasn't clear, even though I said I just discovered this program today. Sorry.

Re: dyld: Library not loaded

Posted: 2012-12-18T23:17:38-07:00
by oneimage
The command I tried using was "identify myfile.png". I think I also tried the convert command. I don't think I tried others, I probably should have.

Re: dyld: Library not loaded

Posted: 2012-12-19T10:50:54-07:00
by fmw42
oneimage wrote:The command I tried using was "identify myfile.png". I think I also tried the convert command. I don't think I tried others, I probably should have.
I do not think you should be getting a libjpeg error when reading a png file!

Can you verify the following works:

convert -version

convert -list configure

and report back what you have on the line starting with DELEGATES

convert logo: logo.png
convert logo: logo.jpg

convert logo.jpg logo2.png
convert logo.png logo2.jpg

Re: dyld: Library not loaded

Posted: 2012-12-19T12:22:28-07:00
by magick
We updated the Mac OS X binary release of ImageMagick. Try it and if you have the same problem, let us know.

Re: dyld: Library not loaded

Posted: 2012-12-19T15:07:03-07:00
by oneimage
I will redownload ImageMagick. I will post the new results soon. But here's the answer to the question the other person asked me. It's the same error.

bash-3.2$ convert -version
dyld: Library not loaded: /ImageMagick-6.7.9/lib/libjpeg.8.dylib
Referenced from: /Applications/ImageMagick-6.8.0/bin/convert
Reason: image not found
Trace/BPT trap: 5

Nobody has asked me about my environment variables yet, but here are the ones with "mag" in them...:

bash-3.2$ set | grep mag
DYLD_LIBRARY_PATH=/Applications/ImageMagick-6.8.0/lib/
MAGICK_HOME=/Applications/ImageMagick-6.8.0
PATH=/Applications/ImageMagick-6.8.0/bin:MAGICK_HOME/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/opt/X11/bin
bash-3.2$

I am thrilled about the possibilities with this program and I am grateful for all the advice.

Re: dyld: Library not loaded

Posted: 2012-12-19T15:43:01-07:00
by oneimage
If you look in the PATH you will see an extra (and probably incorrect) path entry but that probably won't cause any problems. Nevertheless I am reviewing everything in the environment variables very carefully. I will do everything in my power to make this work. I don't want to report on my results of the new binary until I'm sure what the results are. At this point I'm not certain if the latest version is the following link or not, can you confirm?
ftp://ftp.imagemagick.org/pub/ImageMagi ... 2.0.tar.gz

Re: dyld: Library not loaded

Posted: 2012-12-19T15:58:03-07:00
by oneimage
STOP PRESS. Something is working. The convert utility just displayed its syntax correctly. I'm still not sure if my variables contributed to the problem or whether it was a problem in the Mac OS X binary of ImageMagick. I may never know, but it's all good. Here's another command that just worked...

bash-3.2$ identify ~/Music/temp.png
/Users/xxmynamexx/Music/temp.png PNG 100x20 100x20+0+0 8-bit sRGB 9.56KB 0.000u 0:00.000

So now my life has changed forever. I look forward with great anticipation to seeing if I can find a function of this program to return the average "Red pixel level" for a certain image. Don't tell me, make me work for it. Also I look forward to seeing how well the function to "locate image X inside image Y" works.