How to fix warning: Install Compress::Zlib to read compressed information

Started by aocolitii, May 17, 2019, 11:49:51 AM

Previous topic - Next topic

aocolitii

Hi Guys,

We are running tests and sometimes exiftool will throw this warning: "Install Compress::Zlib to read compressed information".
It's not hard to understand the nature of this warning, but we have no clue how to fix it.
Exiftool is used inside Lambda and not installed (following this approach: ExifTool does not need to be installed to run. Just download and extract either the full Perl distribution on Mac/Linux).
We did some research and it seems that Compress::Zlib and other libraries are in "recommended" section and optional.
I assume this is some sort of lazy load during the runtime.
If the library needed, it will be loaded.
Most of the time we can see this message on the internet: "But note that if you move the Perl "exiftool" application, you must also move its "lib" directory to the same location".
Probably there is a way of running Exiftool without installation, but with all libraries (main + dependencies).
Unfortunately, we don't have Perl developers in house.

Is there a way to get Exiftool with ALL libraries, so we can just copy it to Lambda and run it without installation?
Let's help to extract this compressed metadata  ;)

Thank you.

Phil Harvey

The Mac/Linux distributions don't include any of the optional external libraries.  Some may already be available depending on your system, but if they aren't it shouldn't be too hard to install them.  I thought that Compress::Zlib was standard with most Perl installations.  If you are distributing ExifTool in some other package and require these optional libraries, then you should include the optional libraries in your package.  However, you should be aware that these external libraries are mostly compiled, and therefore specific to one architecture (which is why I can't package them with ExifTool).

There are various ways to obtain these libraries, depending on your system and the package manager you use.  You can either do it via software like cpanp, apt-get, brew, rpm or some such thing, or download it from metapan and install it yourself (but this is painful if the package has dependencies).

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

aocolitii

Hi Phil,

Thank you for replying.

Resolving these dependencies manually can take a lot of time.  :)

> However, you should be aware that these external libraries are mostly compiled, and therefore specific to one architecture
Plan B.
I was thinking about using AWS Lambda Linux Image (inside docker).
From there I can compile and create self-contained perl executable with all libraries.
External libraries will be specific to the runtime architecture once they will run inside of a Lambda.

Is there an example or article of how to create environment specific self-contained perl executable Exiftool?

Thank you.

Phil Harvey

There may be a thread in here about creating a stand-alone ExifTool.  I don't have time to check now, but search for "PAR".

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).