The error occurs because the Perl module Image::ExifTool is not found in the Perl module search path (@INC). When you extracted the RPM file using rpm2cpio and cpio, the module files were placed in a temporary directory (/lustre/work/pdl16831/udlc74081/usr/bin/), but Perl does not know to look there for modules.
The best approach is to install the RPM using dnf or yum instead of manually extracting it. This ensures all dependencies and paths are set correctly.
sudo dnf install https://dl.fedoraproject.org/pub/epel/9/Everything/x86_64/Packages/p/perl-Image-ExifTool-13.10-1.el9.noarch.rpmThis will install the package and all its dependencies in the correct locations.
If you must extract the RPM manually, you need to:
/usr/local/share/perl5 or /usr/lib64/perl5/vendor_perl).@INC to include the directory where you extracted the module.Extract the RPM to the correct location:
sudo rpm2cpio perl-Image-ExifTool-13.10-1.el9.noarch.rpm | sudo cpio -idv --directory /usr/localThis will place the module files in /usr/local/usr/bin/ and /usr/local/usr/lib/perl5/....
Move the files to the correct Perl module directory:
sudo mv /usr/local/usr/lib/perl5/vendor_perl/Image/ExifTool.pm /usr/local/share/perl5/
sudo mv /usr/local/usr/lib/perl5/vendor_perl/Image/ExifTool /usr/local/share/perl5/Verify the module is in @INC:
perl -e 'print join("\n", @INC)'If /usr/local/share/perl5 is not in the list, add it to the PERL5LIB environment variable:
export PERL5LIB=/usr/local/share/perl5:$PERL5LIBTo make this permanent, add the line to your ~/.bashrc or /etc/profile.
Test:
exiftool -vercpan to Install the ModuleIf you have cpan or cpanm (CPAN Minus) installed, you can install the module directly:
sudo cpan Image::ExifToolor
sudo cpanm Image::ExifToolIf you only need to run exiftool once, you can use the full path to the script and set PERL5LIB temporarily:
PERL5LIB=/lustre/work/pdl16831/udlc74081/usr/bin/lib:/lustre/work/pdl16831/udlc74081/usr/lib64/perl5/vendor_perl /lustre/work/pdl16831/udlc74081/usr/bin/exiftoolUse dnf install (Solution 1) for a clean, dependency-aware installation. If you must extract manually, ensure the module files are in a directory listed in @INC or update PERL5LIB.
Vibe can make mistakes. Check answers. Learn more