Search code examples
macosperlcpan

I have Perl5.28 installed and Net::LibIDN installed but amavisd cant find it


I'm on a MacMini, using Homebrew to install things.

But - amavisd can't start because apparently it can't find this Net::IDN module?

I'm getting this

ERROR: MISSING REQUIRED BASIC MODULES:
Net::LibIDN
BEGIN failed--compilation aborted at /usr/local/sbin/amavisd line 251.

But I'm sure it is installed.

Fetching http://www.cpan.org/authors/id/D/DA/DAGOLDEN/install-  0.01.tar.gz ... OK
Configuring install-0.01 ... OK
Building and testing install-0.01 ... OK
Successfully installed install-0.01
Net::LibIDN is up to date. (0.12)
1 distribution installed

So how do I tell Perl to find it now?

EDIT: So I'm forcing a reinstall - but still no joy

zeus:~ robert$ sudo cpanm --reinstall Net::LibIDN
Password:
--> Working on Net::LibIDN
Fetching http://www.cpan.org/authors/id/T/TH/THOR/Net-LibIDN-0.12.tar.gz ... OK
Configuring Net-LibIDN-0.12 ... OK
Building and testing Net-LibIDN-0.12 ... OK
Successfully reinstalled Net-LibIDN-0.12
1 distribution installed
zeus:~ robert$ 

and trying to run amavisd ...

zeus:~ robert$ sudo /usr/local/sbin/amavisd -c /usr/local/etc/amavisd.conf debug
Password:
ERROR: MISSING REQUIRED BASIC MODULES:
  Net::LibIDN
BEGIN failed--compilation aborted at /usr/local/sbin/amavisd line 251.
zeus:~ robert$ 

So for some reason, it seems amavisd-new can't find the module. Just that Module?


Solution

  • It's because amavisd uses the system perl, while cpanm was installed to a custom perl and installs modules there.

    Either install the module to system perl, or try to convince amavisd to run in the custom perl (might involve manually changing the shebang lines in its source files).