Solved ImageMagick not working (unable to load module)

Hi there,

I installed graphics/ImageMagick7-nox11 with pkg and I’m unable to have it working.

The command convert input.png output.jpg fails with the error:
Code:
convert: unable to load module '/usr/local/lib/ImageMagick-7.0.3//modules-Q16HDRI/coders/png.la': file not found [USER=37853]error[/USER]/module.c/OpenModule/1279.
convert: no decode delegate for this image format `PNG' @ error/constitute.c/ReadImage/508.
convert: no images defined `output.jpg' @ error/convert.c/ConvertImageCommand/3253.

At first I thought the error was due by the double / in the path, so I tried with:
export MAGICK_CODER_MODULE_PATH=/usr/local/lib/ImageMagick-7.0.3/modules-Q16HDRI/coders

Without success: the path is now correct, yet the error remains. A check with
ls -lsa /usr/local/lib/ImageMagick-7.0.3/modules-Q16HDRI/coders/png.la
Returns:
Code:
-rwxr-xr-x  1 root  wheel   915B Mar 18 13:11 /usr/local/lib/ImageMagick-7.0.3/modules-Q16HDRI/coders/png.la

I also checked the permissions of all intermediate folders. Everything looks fine.

Environment:
  • FreeBSD 11.0-STABLE r313553 without X11;
  • Version: ImageMagick 7.0.3-7 Q16 amd64
Features: Cipher DPC HDRI Modules
Delegates (built-in): bzlib fftw fontconfig fpx freetype jbig jng jp2 jpeg lcms lqr ltdl lzma png tiff webp wmf xml zlib

As reference:
ldd /usr/local/bin/convert
Code:
/usr/local/bin/convert:
 libMagickCore-7.so.0 => /usr/local/lib/libMagickCore-7.so.0 (0x800822000)
 libMagickWand-7.so.0 => /usr/local/lib/libMagickWand-7.so.0 (0x800bee000)
 libltdl.so.7 => /usr/local/lib/libltdl.so.7 (0x800f08000)
 liblcms2.so.2 => /usr/local/lib/liblcms2.so.2 (0x801111000)
 liblqr-1.so.0 => /usr/local/lib/liblqr-1.so.0 (0x801370000)
 libglib-2.0.so.0 => /usr/local/lib/libglib-2.0.so.0 (0x80157f000)
 libintl.so.8 => /usr/local/lib/libintl.so.8 (0x801887000)
 libfftw3.so.3 => /usr/local/lib/libfftw3.so.3 (0x801a91000)
 libfontconfig.so.1 => /usr/local/lib/libfontconfig.so.1 (0x801e12000)
 libfreetype.so.6 => /usr/local/lib/libfreetype.so.6 (0x802058000)
 liblzma.so.5 => /usr/lib/liblzma.so.5 (0x802300000)
 libbz2.so.4 => /usr/lib/libbz2.so.4 (0x802529000)
 libz.so.6 => /lib/libz.so.6 (0x80273c000)
 libm.so.5 => /lib/libm.so.5 (0x802953000)
 libthr.so.3 => /lib/libthr.so.3 (0x802b7d000)
 libc.so.7 => /lib/libc.so.7 (0x802da4000)
 libiconv.so.2 => /usr/local/lib/libiconv.so.2 (0x803158000)
 libpcre.so.1 => /usr/local/lib/libpcre.so.1 (0x803453000)
 libexpat.so.1 => /usr/local/lib/libexpat.so.1 (0x8036c9000)

Please notice I also tried graphics/ImageMagick-nox11 (the previous version) and it has the very same issue.

Has anyone had a similar issue? Any ideas on how to fix this?

Thank you very much for your support.

Best Regards,

Nicholas
 
It looks like the type of error you get when mixing packages and ports. Have you done so on this machine? (Used ports for something)?

if so, you might want to see if building it from ports helps.
 
Yes, I mostly installed everything from pkg, except a few packages I needed from port (for custom options).

Indeed, I rebuilt the entire box (is a FreeBSD virtual machine) for other reasons and now everything is working fine.

Thanks a lot for your suggestion.
 
Back
Top