ExifTool Forum

ExifTool => Developers => Topic started by: Mac2 on December 20, 2021, 09:25:52 AM

Title: ExifTool on Linux - Unexpected Warning about MD5
Post by: Mac2 on December 20, 2021, 09:25:52 AM
I usually use ExifTool on Windows, but today had to use it on Linux for the first time.
I followed the installation instructions from the ExifTool web site and all worked well in no time.

I test the same set of JPEG files on Windows and Linux. Metadata is extracted on both platforms just fine.
But on Linux I see two additional warnings (reported via stderr):

IPTCDigest is not current. XMP may be out of sync
Digest::MD5 must be installed in Photoshop:IPTCDigest


I'm quite sure that I have never seen these before (?) so I wonder is something in my ExifTool installation missing? Or just some Linux thing?
Google did not return anything useful.

The args I use can be seen here: https://exiftool.org/forum/index.php?topic=13119.0
Title: Re: ExifTool on Linux - Unexpected Warning about MD5
Post by: Phil Harvey on December 20, 2021, 09:29:52 AM
Digest::MD5 is an optional package that may not be installed on all systems.  You'll have to install this yourself if you want to use it.

- Phil
Title: Re: ExifTool on Linux - Unexpected Warning about MD5
Post by: StarGeek on December 20, 2021, 11:04:31 AM
Depending upon your Perl installation, you would run either of these in a shell/terminal
cpanm Digest::MD5
or
cpan Digest::MD5
Title: Re: ExifTool on Linux - Unexpected Warning about MD5
Post by: Mac2 on December 20, 2021, 01:05:01 PM
Thanks for your help. Unfortunately, no luck.

I run ExifTool in a Docker container based on Microsoft WSL2 / Ubuntu.
perl -v returns This is perl 5, version 28, subversion 1 (v5.28.1)

I get "command not found" for both commands.
I now know that cpan is a Perl package manager, but it seems to be missing from the WSL2 distro.
Googling only results in the typical circles and mix of outdated or unrelated info, not working examples etc.

I will have to dig into that soon, but not now. I can live without MD5 digests in ExifTool for now.
Title: Re: ExifTool on Linux - Unexpected Warning about MD5
Post by: Phil Harvey on December 20, 2021, 01:09:37 PM
You might want to do exiftool -ver -v to see if you are missing any other optional libraries:

  Archive::Zip         (ZIP, DOCX, PPTX, XLSX, ODP, ODS, ODT, EIP, iWork)
  Compress::Zlib       (DNG, PNG, PDF, DCM, MIE and SWF files)
  Digest::MD5          (PDF files, IPTC information, and JPG Extended XMP)
  Digest::SHA          (PDF with AES-256 encryption)
  IO::Compress::Bzip2  (RWZ files)
  Time::HiRes          (for generating ProcessingTime tag)
  POSIX::strptime      (for inverse date/time conversion)
  Time::Piece          (alternative to POSIX::strptime)
  Unicode::LineBreak   (for column alignment of alternate-language output)
  Win32::API           (for proper handling of Windows file times)
  Win32::FindFile      (for Windows Unicode directory support, app only)
  Win32API::File       (for Windows Unicode file names and file times)
  IO::Compress::RawDeflate   (for writing FLIF images)
  IO::Uncompress::RawInflate (for reading FLIF images)


- Phil
Title: Re: ExifTool on Linux - Unexpected Warning about MD5
Post by: Mac2 on December 20, 2021, 01:25:06 PM
Looks sad. None of these installed.

Well, I just need more digging and learning. I'm new to Docker and WSL and Perl and only slightly experienced in Linux.
I'm sure I'll figure this out in a couple of days and learn how to setup my DockerFile so all this stuff is included in my test image.

At least I can run ExifTool from .NET, extract metadata, ingest the resulting JSON file etc. That's good enough for a day  ;)

Title: Re: ExifTool on Linux - Unexpected Warning about MD5
Post by: Phil Harvey on December 20, 2021, 01:33:38 PM
Sounds like a minimal Perl installation.

The good news is that none of these optional libraries are really necessary unless you care about the specific feature that they enable.

- Phil
Title: Re: ExifTool on Linux - Unexpected Warning about MD5
Post by: StarGeek on December 20, 2021, 01:34:12 PM
Can the docker container see a .exiftool_config file?  If so you could try downloading the module and then add a statement like this to the top of the config file.  It this case, I have all the Windows strawberry perl lib locations included
BEGIN{ push @INC, 'C:\Strawberry\perl\lib'; push @INC, 'C:\Strawberry\perl\site\lib'; push @INC, 'C:\Strawberry\perl\vendor\lib'}
Title: Re: ExifTool on Linux - Unexpected Warning about MD5
Post by: Phil Harvey on December 20, 2021, 01:36:43 PM
The problem with this are module dependencies.  Sometimes you have to install a number of modules just to get one working.  This is why I designed ExifTool to work without needing any other modules (which is why they are "optional").  This is also why package managers like cpanp exist.

- Phil
Title: Re: ExifTool on Linux - Unexpected Warning about MD5
Post by: Mac2 on December 21, 2021, 07:35:40 AM
Thanks to all for providing useful info and suggestions  :)

I managed to get it working. Learning about Linux while learning about Docker... ::)

I've had to install make, gcc, built-essentials and then cpanminus.
Then I could install the missing Perl modules ExifTool needed for my usage scenario.
Then I could download ExifTool, unpack, run the MakeFile and tests to get ExifTool, following installation instructions (https://exiftool.org/install.html#Unix)

No the MD5 warning is issued anymore when processing the files, so I guess that's that. Another step forward!

Just for reference, if somebody else tries to do the same (change 12.38 to whatever ExifTool version is current):

apt update
apt-get install gcc
apt-get install make
apt-get install build-essential

apt-get install cpanminus
cpanm Digest::MD5
cpanm Archive::Zip
cpanm Unicode::LineBreak

cd /tmp
curl -o Image-ExifTool-12.38.tar.gz https://exiftool.org/Image-ExifTool-12.38.tar.gz
tar -xzvf Image-ExifTool-*.tar.gz
cd Image-ExifTool-*
rm -rf Image-ExifTool-*.tar.gz
cd Image-ExifTool-*
perl Makefile.PL
make test
exiftool -ver -v

Keywords: Microsoft Windows WSL2 Ubuntu install ExifTool install Perl Modules
Title: Re: ExifTool on Linux - Unexpected Warning about MD5
Post by: Phil Harvey on December 21, 2021, 08:20:03 AM
Thanks for posting your complete solution.

- Phil
Title: Re: ExifTool on Linux - Unexpected Warning about MD5
Post by: StarGeek on December 21, 2021, 10:59:42 AM
Optional change, based upon what I could find on StackOverflow
cd /tmp
ver=$(curl -s https://exiftool.org/ver.txt)
curl -o Image-ExifTool-${ver}.tar.gz https://exiftool.org/Image-ExifTool-${ver}.tar.gz
tar -xzvf Image-ExifTool-*.tar.gz


I haven't tested it because I can't figure out how WSL works.

And I like the light grey keywords below your post.  I'm going to have to check google in a few days to see if it helps.