Amavis and perl MIME-Tools problem

Hi folks,

I wanted to install amavis on our mail server on AlmaLinux 8.6 but after starting it I get following errors:
fetch_modules: error loading required module MIME/Head.pm:
Can’t locate File/Path.pm in @INC (you may need to install the File::Path module) (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5) at /usr/share/perl5/vendor_perl/File/Temp.pm line 149.
BEGIN failed–compilation aborted at /usr/share/perl5/vendor_perl/File/Temp.pm line 149.
Compilation failed in require at /usr/share/perl5/vendor_perl/MIME/Tools.pm line 14.
BEGIN failed–compilation aborted at /usr/share/perl5/vendor_perl/MIME/Tools.pm line 14.
Compilation failed in require at /usr/share/perl5/vendor_perl/MIME/Head.pm line 125.
BEGIN failed–compilation aborted at /usr/share/perl5/vendor_perl/MIME/Head.pm line 125.
Compilation failed in require at /usr/sbin/amavisd line 212.
fetch_modules: error loading required module MIME/Body.pm:
Attempt to reload MIME/Tools.pm aborted.
Compilation failed in require at /usr/share/perl5/vendor_perl/MIME/Body.pm line 409.
BEGIN failed–compilation aborted at /usr/share/perl5/vendor_perl/MIME/Body.pm line 409.
Compilation failed in require at /usr/sbin/amavisd line 212.
fetch_modules: error loading required module MIME/Entity.pm:
Attempt to reload MIME/Tools.pm aborted.
Compilation failed in require at /usr/share/perl5/vendor_perl/MIME/Entity.pm line 243.
BEGIN failed–compilation aborted at /usr/share/perl5/vendor_perl/MIME/Entity.pm line 243.
Compilation failed in require at /usr/sbin/amavisd line 212.
fetch_modules: error loading required module MIME/Parser.pm:
Can’t locate File/Path.pm in @INC (you may need to install the File::Path module) (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5) at /usr/share/perl5/vendor_perl/MIME/Parser.pm line 135.
BEGIN failed–compilation aborted at /usr/share/perl5/vendor_perl/MIME/Parser.pm line 135.
Compilation failed in require at /usr/sbin/amavisd line 212.
fetch_modules: error loading required module MIME/Decoder.pm:
Attempt to reload MIME/Tools.pm aborted.
Compilation failed in require at /usr/share/perl5/vendor_perl/MIME/Decoder.pm line 93.
BEGIN failed–compilation aborted at /usr/share/perl5/vendor_perl/MIME/Decoder.pm line 93.
Compilation failed in require at /usr/sbin/amavisd line 212.
fetch_modules: error loading required module MIME/Decoder/Base64.pm:
Attempt to reload MIME/Decoder.pm aborted.
Compilation failed in require at /usr/share/perl5/vendor_perl/MIME/Decoder/Base64.pm line 56.
BEGIN failed–compilation aborted at /usr/share/perl5/vendor_perl/MIME/Decoder/Base64.pm line 56.
Compilation failed in require at /usr/sbin/amavisd line 212.
fetch_modules: error loading required module MIME/Decoder/Binary.pm:
Attempt to reload MIME/Decoder.pm aborted.
Compilation failed in require at /usr/share/perl5/vendor_perl/MIME/Decoder/Binary.pm line 44.
BEGIN failed–compilation aborted at /usr/share/perl5/vendor_perl/MIME/Decoder/Binary.pm line 44.
Compilation failed in require at /usr/sbin/amavisd line 212.
fetch_modules: error loading required module MIME/Decoder/QuotedPrint.pm:
Attempt to reload MIME/Decoder.pm aborted.
Compilation failed in require at /usr/share/perl5/vendor_perl/MIME/Decoder/QuotedPrint.pm line 55.
BEGIN failed–compilation aborted at /usr/share/perl5/vendor_perl/MIME/Decoder/QuotedPrint.pm line 55.
Compilation failed in require at /usr/sbin/amavisd line 212.
fetch_modules: error loading required module MIME/Decoder/NBit.pm:
Attempt to reload MIME/Decoder.pm aborted.
Compilation failed in require at /usr/share/perl5/vendor_perl/MIME/Decoder/NBit.pm line 95.
BEGIN failed–compilation aborted at /usr/share/perl5/vendor_perl/MIME/Decoder/NBit.pm line 95.
Compilation failed in require at /usr/sbin/amavisd line 212.
fetch_modules: error loading required module MIME/Decoder/UU.pm:
Attempt to reload MIME/Decoder.pm aborted.
Compilation failed in require at /usr/share/perl5/vendor_perl/MIME/Decoder/UU.pm line 45.
BEGIN failed–compilation aborted at /usr/share/perl5/vendor_perl/MIME/Decoder/UU.pm line 45.
Compilation failed in require at /usr/sbin/amavisd line 212.
fetch_modules: error loading required module MIME/Decoder/Gzip64.pm:
Attempt to reload MIME/Decoder.pm aborted.
Compilation failed in require at /usr/share/perl5/vendor_perl/MIME/Decoder/Gzip64.pm line 55.
BEGIN failed–compilation aborted at /usr/share/perl5/vendor_perl/MIME/Decoder/Gzip64.pm line 55.
Compilation failed in require at /usr/sbin/amavisd line 212.
fetch_modules: error loading required module Net/Server/PreFork.pm:
Attempt to reload File/Temp.pm aborted.
Compilation failed in require at /usr/share/perl5/vendor_perl/Net/Server/PreForkSimple.pm line 22.
BEGIN failed–compilation aborted at /usr/share/perl5/vendor_perl/Net/Server/PreForkSimple.pm line 22.
Compilation failed in require at /usr/share/perl5/base.pm line 138.
…propagated at /usr/share/perl5/base.pm line 160.
BEGIN failed–compilation aborted at /usr/share/perl5/vendor_perl/Net/Server/PreFork.pm line 21.
Compilation failed in require at /usr/sbin/amavisd line 212.
ERROR: MISSING REQUIRED BASIC MODULES:
MIME::Head
MIME::Body
MIME::Entity
MIME::Parser
MIME::Decoder
MIME::Decoder::Base64
MIME::Decoder::Binary
MIME::Decoder::QuotedPrint
MIME::Decoder::NBit
MIME::Decoder::UU
MIME::Decoder::Gzip64
Net::Server::PreFork
BEGIN failed–compilation aborted at /usr/sbin/amavisd line 252.

[root@mail ~]# systemctl status amavisd
● amavisd.service - Amavis mail content checker
Loaded: loaded (/usr/lib/systemd/system/amavisd.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Sat 2022-08-20 09:30:03 CEST; 3min 25s ago
Docs: amavisd-new
Process: 40973 ExecStart=/usr/sbin/amavisd -c /etc/amavisd/amavisd.conf (code=exited, status=255)

Aug 20 09:30:03 * systemd[1]: amavisd.service: Service RestartSec=100ms expired, scheduling restart.
Aug 20 09:30:03 * systemd[1]: amavisd.service: Scheduled restart job, restart counter is at 5.
Aug 20 09:30:03 * systemd[1]: Stopped Amavis mail content checker.
Aug 20 09:30:03 * systemd[1]: amavisd.service: Start request repeated too quickly.
Aug 20 09:30:03 * systemd[1]: amavisd.service: Failed with result ‘exit-code’.
Aug 20 09:30:03 * systemd[1]: Failed to start Amavis mail content checker.

When I installed amavis I were foolowing this guide: Alma Linux 8 / Centos 8/RHEL 8- Setting Amavis and ClamAV - Journal HabibZain

But I can not start amavisd

I left configuration file intact - the only thing I changed is $mydomain and $myhostname.

If anyone can help I would really appriciate it.