SoftCreatR / imei

IMEI - ImageMagick Easy Install
ISC License
309 stars 36 forks source link

convert: unable to load module jpeg.la #94

Closed suntong closed 1 year ago

suntong commented 1 year ago

I'm getting the "convert: unable to load module jpeg.la" error whenever I operate on a jpeg files, like:

$ convert p.jpg p.png
convert: unable to load module '/usr/local/lib/ImageMagick-7.1.1/modules-Q16HDRI/coders/jpeg.la': file not found @ error/module.c/OpenModule/1291.
convert: no decode delegate for this image format `JPEG' @ error/constitute.c/ReadImage/746.
convert: no images defined `p.png' @ error/convert.c/ConvertImageCommand/3354.

What kind of files I'm missing? That file is right there in my system:

$ ls -l /usr/local/lib/ImageMagick-7.1.1/modules-Q16HDRI/coders/jpeg.*
-rwxr-xr-x 1 root root  1190 2023-09-01 12:11 /usr/local/lib/ImageMagick-7.1.1/modules-Q16HDRI/coders/jpeg.la
-rwxr-xr-x 1 root root 80904 2023-09-01 12:11 /usr/local/lib/ImageMagick-7.1.1/modules-Q16HDRI/coders/jpeg.so

$ file /usr/local/lib/ImageMagick-7.1.1/modules-Q16HDRI/coders/png.la
/usr/local/lib/ImageMagick-7.1.1/modules-Q16HDRI/coders/png.la: libtool library file, ASCII text

$ file /usr/local/lib/ImageMagick-7.1.1/modules-Q16HDRI/coders/png.so
/usr/local/lib/ImageMagick-7.1.1/modules-Q16HDRI/coders/png.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=30ae74740a3e720df3c003bb558f30082764383e, stripped

$ diff -wU 1 /usr/local/lib/ImageMagick-7.1.1/modules-Q16HDRI/coders/png.la /usr/local/lib/ImageMagick-7.1.1/modules-Q16HDRI/coders/jpeg.la
--- /usr/local/lib/ImageMagick-7.1.1/modules-Q16HDRI/coders/png.la  2023-09-01 12:11:25.000000000 -0400
+++ /usr/local/lib/ImageMagick-7.1.1/modules-Q16HDRI/coders/jpeg.la 2023-09-01 12:11:25.000000000 -0400
@@ -1,2 +1,2 @@
-# png.la - a libtool library file
+# jpeg.la - a libtool library file
 # Generated by libtool (GNU libtool) 2.4.7
@@ -7,6 +7,6 @@
 # The name that we can dlopen(3).
-dlname='png.so'
+dlname='jpeg.so'

 # Names of this library.
-library_names='png.so png.so png.so'
+library_names='jpeg.so jpeg.so jpeg.so'

@@ -19,3 +19,3 @@
 # Libraries that this one depends upon.
-dependency_libs=' /usr/local/lib/libMagickCore-7.Q16HDRI.la -L/usr//usr/lib/x86_64-linux-gnu -llcms2 -lraqm -llqr-1 -lglib-2.0 -lfftw3 -lxml2 -lfontconfig -lfreetype -lXext -lSM -lICE -lX11 -lbz2 -lzip /usr/lib/x86_64-linux-gnu/libltdl.la -ldl -lpthread -lpng16 -ljpeg -llzma -lz -lm'
+dependency_libs=' /usr/local/lib/libMagickCore-7.Q16HDRI.la -L/usr//usr/lib/x86_64-linux-gnu -llcms2 -lraqm -llqr-1 -lglib-2.0 -lfftw3 -lxml2 -lfontconfig -lfreetype -lXext -lSM -lICE -lX11 -lbz2 -lz -lzip /usr/lib/x86_64-linux-gnu/libltdl.la -ldl -lpthread -ljpeg -lm'

@@ -24,3 +24,3 @@

-# Version information for png.
+# Version information for jpeg.
 current=0
suntong commented 1 year ago

Solved.

I build the im7 under Ubuntu and used it in Debian.

However, under Debian GNU/Linux 12 (bookworm), there is libjpeg62-turbo yet the im7 was built against libjpeg-turbo8 under Ubuntu.

Installing libjpeg-turbo8 from Ubuntu to my Debian 12 solved the problem.