Imapsync Generates "Can't locate Digest/ in @INC"

I’m trying to install imapsync package on RockyLinux 9.2, But while testing it by command [imapsync], I received this message

[root@XXX ~]# dnf install imapsync
---- Installed Successfully ---

[root@XXX ~]# imapsync
Can't locate Digest/ in @INC (you may need to install the Digest::HMAC_SHA1 module) (@INC contains: /usr/local/lib64/perl5/5.32 /usr/local/share/perl5/5.32 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5) at /usr/bin/imapsync line 988.
BEGIN failed--compilation aborted at /usr/bin/imapsync line 988.

I looked for this issue but I found one for a [brew] package Github page, and no solution.

Any Help? Thanks

do you have the following package installed.

if not check if you can install it, it may solve the problem.
regards peter

1 Like


Dependencies resolved.
 Package                              Architecture       Version                          Repository             Size
 imapsync                             noarch             2.229-1.el9                      epel                  339 k
Installing dependencies:
 perl-Data-Uniqid                     noarch             0.12-27.el9                      epel                   12 k
 perl-Encode-IMAPUTF7                 noarch             1.05-18.el9                      epel                   15 k
 perl-File-Copy-Recursive             noarch             0.45-7.el9                       crb                    26 k
 perl-File-Tail                       noarch             1.3-24.el9                       epel                   26 k
 perl-IO-Tee                          noarch             0.66-5.el9                       epel                   22 k
 perl-JSON-WebToken                   noarch             0.10-18.el9                      epel                   27 k
 perl-Mail-IMAPClient                 noarch             3.42-7.el9                       epel                  209 k
 perl-Parse-RecDescent                noarch             1.967015-14.el9                  epel                  196 k
 perl-Proc-ProcessTable               x86_64             0.634-1.el9                      epel                   47 k
 perl-Readonly                        noarch             2.05-16.el9                      crb                    41 k
 perl-Regexp-Common                   noarch             2017060201-11.el9                epel                  192 k
 perl-Sys-MemInfo                     x86_64             0.99-18.el9.0.1                  appstream              25 k
 perl-Test-MockObject                 noarch             1.20200122-7.el9                 epel                   39 k
 perl-Test-Pod                        noarch             1.52-12.el9                      crb                    18 k
 perl-Unicode-String                  x86_64             2.10-18.el9                      epel                  114 k

Should I install it from Rocky repos?

yes, if its available I know it is in fedora 38 and in rocky 8, im not using 9 yet but dont see any reason why it should not be there
regards peter

@wintpe … Yes Found

[root@XXX ~]# dnf info perl-Digest-HMAC
Last metadata expiration check: 0:00:40 ago on Tue 01 Aug 2023 10:34:36 AM UTC.
Available Packages
Name         : perl-Digest-HMAC
Version      : 1.03
Release      : 29.el9
Architecture : noarch
Size         : 16 k
Source       : perl-Digest-HMAC-1.03-29.el9.src.rpm
Repository   : appstream
Summary      : Keyed-Hashing for Message Authentication
URL          :
License      : GPL+ or Artistic
Description  : HMAC is used for message integrity checks between two parties that
             : share a secret key, and works in combination with some other Digest
             : algorithm, usually MD5 or SHA-1. The HMAC mechanism is described in
             : RFC 2104.
             : HMAC follow the common Digest:: interface, but the constructor takes
             : the secret key and the name of some other simple Digest:: as argument.

not sure why it was not a dependency for imapsync depends where you got the imapsync rpm, there are many rpm based systems and they dont all share the same setup.
regards peter

Just run this command dnf install imapsync

well if it does solve your problem then its a packaging bug
regards peter

No solution for Rocky?

did it not solve your problem installing the rpm?
regards peter

I don’t get it, You mean install rpm, and install imapsync through it?

I think imapsync has an online tool , Is it good to move mails?

install the HMAC rpm first then try to use imapsync

i just tried installing it on 8 to see if its the same problem, very broken on my system.

dnf install imapsync
Last metadata expiration check: 0:11:46 ago on Tue 01 Aug 2023 11:31:08 BST.
Problem: conflicting requests

  • nothing provides perl(File::Copy::Recursive) needed by imapsync-2.229-1.el8.noarch
  • nothing provides perl(Readonly) needed by imapsync-2.229-1.el8.noarch
  • nothing provides perl(Test::Pod) needed by imapsync-2.229-1.el8.noarch
    (try to add ‘–skip-broken’ to skip uninstallable packages or ‘–nobest’ to use not only best candidate packages)

but i installed it on fedora 38 no issues at all, but the

rpm -qal|grep

rpm -qa|grep HMAC

was already there

and when i tried to remove it to see if it gave same issue you are seeing

rpm -e perl-Digest-HMAC-1.04-7.fc38.noarch
error: Failed dependencies:
perl(Digest::HMAC_MD5) is needed by (installed) perl-NTLM-1.09-34.fc38.noarch
perl(Digest::HMAC_MD5) is needed by (installed) imapsync-2.229-2.fc38.noarch
perl(Digest::HMAC_SHA1) is needed by (installed) imapsync-2.229-2.fc38.noarch

so obviously the version of imapsync on Rhel9/rocky9 has a packaging bug that was fixed upstream

update: you asked if that tool is any good for imap transfers online, just use thunderbird, thats what i did when i created a new imap server.
register both accounts source and destination and just drag and drop the emails from one to another a folder at a time.

regards peter

Do you know any alternative way to move mails from shared host?

Fixed by installing perl-Digest-HMAC

dnf install perl-Digest-HMAC

Just a quick test and imapsync properly installs perl-Digest-HMAC:

[root@Rocky9 ~]# dnf install imapsync
Last metadata expiration check: 2:53:14 ago on Thu 03 Aug 2023 15:41:48.
Dependencies resolved.
 Package                                                      Architecture                              Version                                                 Repository                                    Size
 imapsync                                                     noarch                                    2.229-1.el9                                             epel                                         339 k
Installing dependencies:
 perl-Digest-HMAC                                             noarch                                    1.03-29.el9                                             appstream                                     16 k

In my case imapsync is coming from EPEL, so if yours is coming from somewhere else then you should file a bug with them about the missing dependancy. If it’s coming from EPEL then something else is wrong, and you haven’t shown enough info to be able to figure it out properly.