7

I'm on a Mac and am having problems with Emacs and libmagick.

Right now, Emacs exits and prints:

  Library not loaded: /usr/local/opt/imagemagick/lib/libMagickWand-6.Q16.2.dylib
  Referenced from: /usr/local/Cellar/emacs-plus/24.5/Emacs.app/Contents/MacOS/Emacs
  reason: image not found

But, that file does exist.

[I] bheesham.persaud $ file /usr/local/opt/imagemagick/lib/libMagickWand-6.Q16.2.dylib
/usr/local/opt/imagemagick/lib/libMagickWand-6.Q16.2.dylib: Mach-O 64-bit dynamically linked shared library x86_64

A similar error pops up in the macOS Report Problem dialog when trying to launch an Emacs GUI.

What do I need to do to get Emacs to recognize the imagemagick library?

Additional information:

Process:               Emacs [96152]
Path:                  /usr/local/Cellar/emacs-plus/24.5/Emacs.app/Contents/MacOS/Emacs
Identifier:            org.gnu.Emacs
Version:               Version 24.5 (9.0)
Code Type:             X86-64 (Native)
Parent Process:        ??? [1]
Responsible:           Emacs [96152]
  • 1
    Emacs seems to be looking for libMagickCore and you have shown that libMagickWand exists. Also, can you give a little more background? Is this the first time you have installed emacs 24.5? If not, were you using this version before and it suddenly stopped working? – nispio Dec 19 '16 at 17:47
  • I had this problem once. Did you update imagemagick ? If so, you'd have to reinstall emacs with --with-imagemagick option if you want it to work again. – Chakravarthy Raghunandan Dec 19 '16 at 17:49
  • @ChakravarthyRaghunandan that seems to have worked, thank you! – Bheesham Persaud Dec 19 '16 at 18:58
  • @nispio Right. It seems as if I had two different versions of Emacs installed, and that error was copied from the mac OS Problem Report dialog. The file I stat'd, was from the error that the command line Emacs gave, which turns out was a different version. – Bheesham Persaud Dec 19 '16 at 19:04
  • @ChakravarthyRaghunandan: could you please post your comment as an answer so that OP can accept it? It would help to add a little more explanation/context for future readers. – Dan Dec 19 '16 at 19:07
4

The problem usually happens when you have compiled emacs with --with-imagemagick configuration option. Here, emacs is compiled with a specific version of imagemagick and the OP updated his imagemagick, but emacs still expects the old version of imagemagick and fails to find the old executable and hence, blows up at startup with an error message.

You could solve this problem by creating an alias for imagemagick to point to the path of the old executable(the old version of imagemagick is not deleted by default by homebrew) OR you can just reinstall emacs from homebrew with --with-imagemagick option and let emacs get compiled the latest version of imagemagick. That will fix the error.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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