# strace perl -V 2>&1 | grep Config.pm
stat("/usr/local/lib64/perl5/Config.pmc", 0x7ffcdb6b0c90) = -1 ENOENT (No such file or directory)
stat("/usr/local/lib64/perl5/Config.pm", 0x7ffcdb6b0c90) = -1 ENOENT (No such file or directory)
stat("/usr/local/share/perl5/Config.pmc", 0x7ffcdb6b0c90) = -1 ENOENT (No such file or directory)
stat("/usr/local/share/perl5/Config.pm", 0x7ffcdb6b0c90) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/perl5/vendor_perl/Config.pmc", 0x7ffcdb6b0c90) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/perl5/vendor_perl/Config.pm", 0x7ffcdb6b0c90) = -1 ENOENT (No such file or directory)
stat("/usr/share/perl5/vendor_perl/Config.pmc", 0x7ffcdb6b0c90) = -1 ENOENT (No such file or directory)
stat("/usr/share/perl5/vendor_perl/Config.pm", 0x7ffcdb6b0c90) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/perl5/Config.pmc", 0x7ffcdb6b0c90) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/perl5/Config.pm", {st_mode=S_IFREG|0644, st_size=3195, ...}) = 0
openat(AT_FDCWD, "/usr/lib64/perl5/Config.pm", O_RDONLY) = 4
el8, regular account:
$ strace perl -V 2>&1 | grep Config.pm
stat("/usr/local/lib64/perl5/Config.pmc", 0x7ffeab66d420) = -1 ENOENT (No such file or directory)
stat("/usr/local/lib64/perl5/Config.pm", 0x7ffeab66d420) = -1 ENOENT (No such file or directory)
stat("/usr/local/share/perl5/Config.pmc", 0x7ffeab66d420) = -1 ENOENT (No such file or directory)
stat("/usr/local/share/perl5/Config.pm", 0x7ffeab66d420) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/perl5/vendor_perl/Config.pmc", 0x7ffeab66d420) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/perl5/vendor_perl/Config.pm", 0x7ffeab66d420) = -1 ENOENT (No such file or directory)
stat("/usr/share/perl5/vendor_perl/Config.pmc", 0x7ffeab66d420) = -1 ENOENT (No such file or directory)
stat("/usr/share/perl5/vendor_perl/Config.pm", 0x7ffeab66d420) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/perl5/Config.pmc", 0x7ffeab66d420) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/perl5/Config.pm", {st_mode=S_IFREG|0644, st_size=3195, ...}) = 0
openat(AT_FDCWD, "/usr/lib64/perl5/Config.pm", O_RDONLY) = 4
Both search the same paths and neither fails for me.
The directory /usr/local/lib64/perl5 does not exist either, does it?
There could be a permission issue on the path to the (non-existing) file.
I would say if it’s under /usr/local that they have compiled and installed perl rather than use what the system provides in the Rocky repositories. Or used a third-party repository for a newer version of perl which installs under /usr/local - which hasn’t been mentioned by the OP in what they have exactly installed and how.
In which case, something unsupported has been done. Otherwise, the perl binaries would have been in the places mentioned by @jlehtone
Looks like this is specific to this server only. Maybe someone installed another Perl manually.
Tested on a different server and it’s perl-interpreter installing into /usr/lib64/perl5/Config.pm
and /usr/local/lib64/perl5/': No such file or directory